You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement functionality to read an RDB (Redis Data Persistence) file at the start of the program. The file will be provided via --dir and --dbfilename options. If the specified RDB file does not exist, the program should treat the database as empty.
Requirements:
On program start, check if the RDB file specified by --dir and --dbfilename exists:
If the file exists, read and load the database from it.
If the file does not exist, initialize the database as empty.
Implement support for reading numbers stored in the RDB file using both little-endian and big-endian formats, as per the RDB specification.
Integrate the reading functionality with the SAVE command to ensure that a valid RDB file is generated and can be read back correctly.
Acceptance Criteria:
The program correctly reads an existing RDB file at startup, loading the database with its contents.
If the RDB file does not exist, the program initializes with an empty database.
The program can correctly interpret numbers stored in little-endian and big-endian formats within the RDB file.
The RDB file generated by the SAVE command is valid and can be successfully read on subsequent startups.
Additional Notes:
Refer to the MDN article on endianness to understand how to handle little-endian and big-endian formats.
Ensure the implementation is robust, handling edge cases such as corrupted or partially written RDB files.
The text was updated successfully, but these errors were encountered:
Implement functionality to read an RDB (Redis Data Persistence) file at the start of the program. The file will be provided via
--dir
and--dbfilename
options. If the specified RDB file does not exist, the program should treat the database as empty.Requirements:
--dir
and--dbfilename
exists:SAVE
command to ensure that a valid RDB file is generated and can be read back correctly.Acceptance Criteria:
SAVE
command is valid and can be successfully read on subsequent startups.Additional Notes:
The text was updated successfully, but these errors were encountered: