Ensure correct segment order while returning segment files.
Author: ayushsatyam146Created May 30, 2025Updated Jun 2, 2025
Ensure that the files returned in the segments() are in asscending order always. Please identify if any edge cases will prevent this from happening either in the file fecthing phase or in the new segment file creation phase and handle those cases ensuring return in strictly ascending order so that entries can be replayed in strictly increasing order of LSN.
Refer the below TODO comment in segments method.
// TODO: Check that the segment files are returned in the correct order
// The order has to be in ascending order of the segment index.Setup Instructions
- setup DiceDB server locally from the source - instructions
- setup DiceDB Go SDK locally from the source - instructions
- setup DiceDB CLI locally from the source - instructions
- refer to the
Pointing to local checked-outdicedb-gosection inREADME`.
Start the DiceDB server
$ go run main.go --log-level debugFollow the contribution guidelines
These are general guidelines to follow before you submit a patch. Please mark them as done once you complete them
- please go through the CONTRIBUTING guide
- follow LOGGING best practices
- follow Golang best practices
- run
make linton your local copy of the codebase
Source: dicedb/dicedb