oh-my-tidb / mok Goto Github PK
View Code? Open in Web Editor NEWmaster of keys
License: MIT License
master of keys
License: MIT License
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
> ./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(...)
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')
make it easier to install.
After we add RawKV API v2 to TiKV (see https://tikv.org/docs/6.5/concepts/explore-tikv-features/api-v2/), we want a tool to build & parse such keys in new format for, e.g. debugging, get region of key on PD, etc.
input table id, row id, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.