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
redis: image: redislabs/rejson:latest
kvrocks: image: apache/kvrocks:latest
❯ redis-cli -h 192.168.1.72 -p 6369 192.168.1.72:6369> flushdb OK 192.168.1.72:6369> JSON.SET doc $ '{"f1":{"a1":0},"f2":{"a2":0}}' OK 192.168.1.72:6369> JSON.GET doc "{\"f1\":{\"a1\":0},\"f2\":{\"a2\":0}}" 192.168.1.72:6369> JSON.MSET doc $.f1.a1 1 doc $.f2.a2 2 OK 192.168.1.72:6369> JSON.GET doc "{\"f1\":{\"a1\":1},\"f2\":{\"a2\":2}}"
❯ redis-cli -h 192.168.1.72 -p 6666 192.168.1.72:6666> flushdb OK 192.168.1.72:6666> JSON.SET doc $ '{"f1":{"a1":0},"f2":{"a2":0}}' OK 192.168.1.72:6666> JSON.GET doc "{\"f1\":{\"a1\":0},\"f2\":{\"a2\":0}}" 192.168.1.72:6666> JSON.MSET doc $.f1.a1 1 doc $.f2.a2 2 OK 192.168.1.72:6666> JSON.GET doc "{\"f1\":{\"a1\":0},\"f2\":{\"a2\":2}}"
I hope that the behavior of JSON.MSET in KVROCKS is consistent with Redis.
For Redis, the JSON.MSET command can modify multiple fields of the same key simultaneously, but for KVROCKS, only one field is successfully modified.
I found that in the code, JSON.MSET performs a query for each sub-command, resulting in a separate result in memory for each key if the keys are the same. Can it be modified so that there is only one copy of the key in memory and no repeated reads? https://github.com/apache/kvrocks/blob/f2bc224bc342f7e2b679cb2dc79d7a31067643ca/src/types/redis_json.cc#L579C15-L579C17
No response
The text was updated successfully, but these errors were encountered:
@VIVALXH Good catch, would you like to fix this?
Sorry, something went wrong.
Thank you for your response and for recognizing the issue. I'd be happy to try and fix this issue, and I plan to start working after my workday.
@VIVALXH Thank you!
Fixed in #2579.
No branches or pull requests
Search before asking
Version
redis:
image: redislabs/rejson:latest
kvrocks:
image: apache/kvrocks:latest
Minimal reproduce step
redis:
image: redislabs/rejson:latest
kvrocks:
image: apache/kvrocks:latest
What did you expect to see?
I hope that the behavior of JSON.MSET in KVROCKS is consistent with Redis.
What did you see instead?
For Redis, the JSON.MSET command can modify multiple fields of the same key simultaneously, but for KVROCKS, only one field is successfully modified.
Anything Else?
I found that in the code, JSON.MSET performs a query for each sub-command, resulting in a separate result in memory for each key if the keys are the same. Can it be modified so that there is only one copy of the key in memory and no repeated reads?
https://github.com/apache/kvrocks/blob/f2bc224bc342f7e2b679cb2dc79d7a31067643ca/src/types/redis_json.cc#L579C15-L579C17
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: