Skip to content

compatiable ror bitmap rdb type - #1079

Open
jackjeyis wants to merge 7 commits into
masterfrom
feature/rdb820
Open

compatiable ror bitmap rdb type#1079
jackjeyis wants to merge 7 commits into
masterfrom
feature/rdb820

Conversation

@jackjeyis

Copy link
Copy Markdown
Collaborator

No description provided.

new byte[][]{RedisOpType.SET.name().getBytes(), context.getKey().get(), value},
context.getKey(), value));

if(this.context.getRdbVersion() > 9) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这段防御是否不需要?

return NON_KEY_COMMANDS.contains(ByteBuffer.wrap(args));
}

private boolean usesFieldsSyntax(RedisOpType opType) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

放到OpType定义里?

private static final Map<Integer,Map<Short, RdbType>> versionTypes = new HashMap<>();

RdbType(short code, boolean rdbOp, Function<RdbParseContext, RdbParser> parserConstructor) {
this.version = 0;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

复用RdbType(int version,short code, boolean rdbOp, Function<RdbParseContext, RdbParser> parserConstructor)?


int i = keyStartIndex;
while (i < args.length) {
int argLen = args.length;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

扫一下8.0注册了getkeyrequests_proc的命令,如果都符合可以用这种写法;否则可以参考下Redis的写法,对于特殊的key获取定义方法注册到命令定义枚举

return NON_KEY_COMMANDS.contains(ByteBuffer.wrap(args));
}

private RedisOp parseFieldsCommand(RedisOpType opType, byte[][] args) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

和parseGeneralCommands的关系?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants