Closed VIVALXH closed 1 month ago
@VIVALXH Good catch, would you like to fix this?
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.
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?