ymiuraaa commented on issue #2940: URL: https://github.com/apache/kvrocks/issues/2940#issuecomment-3164918995
Yes, based on #294 and #2941, this issue seems to be focused on a separate CLI tool, not a new command or mode within kvrocks itself. From what I’ve seen in the repo, [rocksdb::SstFileWriter](https://github.com/facebook/rocksdb/wiki/creating-and-ingesting-sst-files) hasn’t been used yet, so this would be the first integration of external SST generation logic into Kvrocks tooling, right? Also regarding cluster mode: @zhixinwen has a valid concern I think. slot sharding adds complexity because kvrocks expects keys to be mapped to specific hash slots. So then the current plan I have in mind is: - Format keys according to kvrocks's internal encoding (namespace:type:key, and namespace:hash:key|field). - Use somthing like [this from redis](https://github.com/redis/redis/blob/unstable/src/crc16.c) to determine the slot for each key. The crc16.c file is in the unstable branch of Redis, but that doesn’t mean the CRC16 logic itself is unstable or experimental so it should be thoroughly tested. - Initially support a single-slot-only SST, with an optional --force-slot support. What do you think about this plan? Also if the input contains multiple slots, what should we do? reject it or output multiple SSTs? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
