We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
为方便在 raft 模式和单机模式之间切换,所有的写命令底层在写 rocksdb 时应当采用我们封装的 Batch 接口。
参考PR:OpenAtomFoundation/pikiwidb#285
参考上述PR,总结起来有四件事:
对于第 2 点,也是最麻烦的地方,但可以用 vim 的替换来做,非常方便。 这里我把替换的命令放出来,只需要在命令模式下,在下边这行命令前边加上行号范围即可
s/batch\.(\w+)\(handles_\[(\w+)\], (.+)\);/batch->\1(\2, \3);/gc
s/batch\.\(\w\+\)(handles_\[\(\w\+\)\], \(.\+\));/batch->\1(\2, \3);/gc
示例:如图,找到想要替换的函数的范围(行号),然后添加在上述命令前即可。比如我想要替换 LPushx 这个函数的写操作,找到开始行号和结束行号,然后在VIM中输入下边内容即可:
:356,387s/batch\.\(\w\+\)(handles_\[\(\w\+\)\], \(.\+\));/batch->\1(\2, \3);/gc
// Strings Commands
smj:
// Hash
ncy:
// Sets Commands
// Lists Commands
zzl:
lihao:
// Zsets Commands
ZAdd
ZRem
ZIncrby
ZRemrangebylex
ZRemrangebyrank
ZRemrangebyscore
todo: lh:
// Keys Commands
The text was updated successfully, but these errors were encountered:
Assign me, plz. 😄
Sorry, something went wrong.
Bot detected the issue body's language is not English, translate it automatically.
@Iam-WenYi 认领部分命令即可
@Iam-WenYi Just claim some commands
No branches or pull requests
为方便在 raft 模式和单机模式之间切换,所有的写命令底层在写 rocksdb 时应当采用我们封装的 Batch 接口。
修改方法:
参考上述PR,总结起来有四件事:
小技巧
对于第 2 点,也是最麻烦的地方,但可以用 vim 的替换来做,非常方便。
这里我把替换的命令放出来,只需要在命令模式下,在下边这行命令前边加上行号范围即可
s/batch\.(\w+)\(handles_\[(\w+)\], (.+)\);/batch->\1(\2, \3);/gc
s/batch\.\(\w\+\)(handles_\[\(\w\+\)\], \(.\+\));/batch->\1(\2, \3);/gc
示例:如图,找到想要替换的函数的范围(行号),然后添加在上述命令前即可。比如我想要替换 LPushx 这个函数的写操作,找到开始行号和结束行号,然后在VIM中输入下边内容即可:
待做事项
// Strings Commands
smj:
lh
gkj:
// Hash
ncy:
// Sets Commands
lh:
// Lists Commands
zzl:
lihao:
// Zsets Commands
ZAdd
ZRem
ZIncrby
ZRemrangebylex
ZRemrangebyrank
ZRemrangebyscore
todo:
lh:
// Keys Commands
The text was updated successfully, but these errors were encountered: