Zakir032002 opened a new pull request, #3366: URL: https://github.com/apache/kvrocks/pull/3366
- Serialize SortedInt as RDB Set for Redis compatibility - Use RangeByValue() to get all integers deterministically - No RESTORE changes (SortedInt dumps restore as Set, like Bitmap→String) - Resolves part of #3319 Testing: - Manual test confirms DUMP no longer returns error - RESTORE successfully creates Set with preserved data - All integers maintained in restored Set Manuel test: root@codespaces-6e5713:/workspaces/kvrocks# # Connect to Kvrocks redis-cli -p 6666 127.0.0.1:6666> SIADD testkey 100 200 300 (integer) 0 // already exists 127.0.0.1:6666> SICARD testkey (integer) 3 127.0.0.1:6666> TYPE testkey sortedint 127.0.0.1:6666> DUMP testkey "\x02\x03\xc0d\xc1\xc8\x00\xc1,\x01\x06\x00\xb2\x01\xaa\xe2\x06h\xba\x8d" 127.0.0.1:6666> SIADD mykey 5 12 23 89 100 (integer) 0 127.0.0.1:6666> DUMP mykey "\x02\x05\xc0\x05\xc0\x0c\xc0\x17\xc0Y\xc0d\x06\x00\xa8\x19U\x90\x8f\x011o" 127.0.0.1:6666> RESTORE newkey 0 "\x02\x05\xc0\x05\xc0\x0c\xc0\x17\xc0Y\xc0d\x06\x00\xa8\x19U\x90\x8f\x011o" OK 127.0.0.1:6666> TYPE newkey set 127.0.0.1:6666> SMEMBERS newkey 1) "100" 2) "12" 3) "23" 4) "5" 5) "89" 127.0.0.1:6666> DUMP nonexistent (nil) 127.0.0.1:6666> exit -- 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]
