Commit Graph

11 Commits

Author SHA1 Message Date
Kelvin Mwinuka
85e8a68125 Close AOF engine files on shutdown. Close snapshot file after restoring snapshot on startup. Implemented tests for HELLO command in echovault package. Implemented tests for GetServerInfo in echovault package. 2024-07-03 00:53:49 +08:00
Kelvin Mwinuka
59143b4cd5 Added multi-database support for loggin and restoring in log engine.
Added multi-database support for preamble snapshots and restoration in preamble engine.
Added multi-database support for aof engine.
Removed buffered channel from log and aof engines. Command logging is now synchronous.
Added multi-database support for the raft layer's data replication.
2024-07-01 06:06:26 +08:00
Kelvin Clement Mwinuka
cb99ff8993 rewriteAOF method in echovault.go now handles the rewrite synchronously. Removed newline character in Write method of append store. Added test case for REWRITEAOF command and restore from AOF. 2024-06-09 02:28:03 +08:00
Kelvin Clement Mwinuka
6afef55dbe Replaced time.After in snapshot and aof engines with ticker. 2024-06-08 23:19:23 +08:00
Kelvin Clement Mwinuka
555387494b Replaced all time.After instances to time.Ticker 2024-06-02 17:55:15 +08:00
Kelvin Clement Mwinuka
baf5f3d5da Return error from preamble restore method instead of just logging it. Implemented test for AOF engine persist and restore flow. 2024-05-05 01:30:04 +08:00
Kelvin Clement Mwinuka
915c34d9f6 Refactored Write function of append store to use tidwall/resp to parse commands.
AOF log no longer prints an empty line between each command.
Return error on NewAppendStore instead of just logging.
Implemented test for AppendStore
2024-05-04 22:27:05 +08:00
Kelvin Mwinuka
1e421cb64a Implemented a Clock interface that is injected everywhere time.Now and time.After are used. 2024-04-05 03:11:03 +08:00
Kelvin Mwinuka
e40e49eb4b Skip AOF command logging if ReadWriter is nil. Pass config to api test files to prevent aof data directory from being created everytime tests are executed. 2024-04-01 01:29:37 +08:00
Kelvin Mwinuka
bc188cfea4 Moved some types into internal folder as they will do not need to be exported. Changed GetState method to getState to make it private to the echovault package 2024-03-26 20:26:48 +08:00
Kelvin Mwinuka
7cec2da854 Moved aof and snapshot packages to internal folder 2024-03-26 13:51:37 +08:00