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.

This commit is contained in:
Kelvin Clement Mwinuka
2024-06-09 02:28:03 +08:00
parent 7661ab1c92
commit cb99ff8993
8 changed files with 1751 additions and 1494 deletions

View File

@@ -179,7 +179,7 @@ func (engine *Engine) RewriteLog() error {
engine.startRewriteFunc()
defer engine.finishRewriteFunc()
// Create AOF preamble
// Create AOF preamble.
if err := engine.preambleStore.CreatePreamble(); err != nil {
return fmt.Errorf("rewrite log -> create preamble error: %+v", err)
}