Code Monkey home page Code Monkey logo

mok's People

Contributors

disksing avatar hicqu avatar jayson-huang avatar lysu avatar pingyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

mok's Issues

support bytes input as integer array

For example:

[116, 128, 0, 0, 0, 0, 203, 12, 95, 114, 128, 0, 0, 0, 91, 203, 70, 104]  // in Rust
[116 128 0 0 0 0 203 12 95 114 128 0 0 0 91 203 70 104] // in Go

Failed to parse the begin key of a given keyspace

> ./pd-ctl -i
» region 2988366876
{
  "id": 2988366876,
  "start_key": "78000DA200000000FB",
  "end_key": "78000DA274800000FF00000000535F7200FE",
  ...
  "buckets": [
    "78000DA200000000FB",
    "78000DA274800000FF000000003C5F7280FF000000008ED2A800FE",
    "78000DA274800000FF00000000535F7200FE"
  ]
}

mok failed to parse the begin key of it

>  mok 78000DA200000000FB
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0x140208803d0 stack=[0x14020880000, 0x14040880000]
fatal error: stack overflow

runtime stack:
runtime.throw({0x1036a717b?, 0x104032a20?})
	/opt/homebrew/Cellar/go/1.19.6/libexec/src/runtime/panic.go:1047 +0x40 fp=0x16d496d50 sp=0x16d496d20 pc=0x102e8bab0
runtime.newstack()
	/opt/homebrew/Cellar/go/1.19.6/libexec/src/runtime/stack.go:1103 +0x464 fp=0x16d496f00 sp=0x16d496d50 pc=0x102ea5094
runtime.morestack()
	/opt/homebrew/Cellar/go/1.19.6/libexec/src/runtime/asm_arm64.s:316 +0x70 fp=0x16d496f00 sp=0x16d496f00 pc=0x102eb9560

goroutine 1 [running]:
runtime.heapBitsSetType(0x1401b202400?, 0x40?, 0x40?, 0x10397ffe0?)
	/opt/homebrew/Cellar/go/1.19.6/libexec/src/runtime/mbitmap.go:844 +0x980 fp=0x140208803d0 sp=0x140208803d0 pc=0x102e692d0
runtime.mallocgc(0x40, 0x10397ffe0, 0x1)
	/opt/homebrew/Cellar/go/1.19.6/libexec/src/runtime/malloc.go:1050 +0x63c fp=0x14020880440 sp=0x140208803d0 pc=0x102e609cc
runtime.newobject(0x1041fd8b0?)
	/opt/homebrew/Cellar/go/1.19.6/libexec/src/runtime/malloc.go:1202 +0x2c fp=0x14020880470 sp=0x14020880440 pc=0x102e60dcc
main.N(...)

support output encoded key

mok -format hex "t\\x80\\x00\\x00\\x00\\x00\\x00W\\x00_r\\x80\\x00\\x00\\x00\\x00E\\xe9S"
"745C7838305C7830305C7830305C7830305C7830305C783030575C7830305F725C7838305C7830305C7830305C7830305C783030455C78653953"
└─## decode go literal key
  └─"7480000000000057005F72800000000045E953"
    └─## table row key
      ├─table: 22272
      └─row: 4581715

Sometime we need encoded('7480000000000057005F72800000000045E953')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.