Evaluate cleanup operations in Stop method of WAL
Author: ayushsatyam146Created May 30, 2025Updated May 30, 2025
he Stop method of the walForge is responsible for gracefully shutting down the Write-Ahead Log component. It currently handles stopping internal tickers, canceling the context, syncing the current segment file to disk, and closing the file. However there might be additional cleanup operations missing, which could lead to resource leaks, unpersisted state, or an inconsistent system state upon shutdown or subsequent restart. Refer below TODO in code
// TODO: See if we are missing any other cleanup operations.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