Skip to content

Commit dc6567c

Browse files
ebuchmanmelekes
authored andcommitted
consensus: flush wal on stop (#3297)
Should fix #3295 Also partial fix of #3043
1 parent 08dabab commit dc6567c

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Special thanks to external contributors on this release:
8989
- [p2p] [\#3247](https://github.com/tendermint/tendermint/issues/3247) Fix panic in SeedMode when calling FlushStop and OnStop
9090
concurrently
9191
- [p2p] [\#3040](https://github.com/tendermint/tendermint/issues/3040) Fix MITM on secret connection by checking low-order points
92-
- [privval] [\#3258](https://github.com/tendermint/tendermint/issues/3258) Fix race between sign requests and ping requests in socket
92+
- [privval] [\#3258](https://github.com/tendermint/tendermint/issues/3258) Fix race between sign requests and ping requests in socket that was causing messages to be corrupted
9393

9494
## v0.29.1
9595

CHANGELOG_PENDING.md

+2
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ Special thanks to external contributors on this release:
2121
### IMPROVEMENTS:
2222

2323
### BUG FIXES:
24+
- [consensus] \#3297 Flush WAL on stop to prevent data corruption during
25+
graceful shutdown

consensus/wal.go

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ func (wal *baseWAL) OnStart() error {
116116
// Use Wait() to ensure it's finished shutting down
117117
// before cleaning up files.
118118
func (wal *baseWAL) OnStop() {
119+
wal.group.Flush()
119120
wal.group.Stop()
120121
wal.group.Close()
121122
}

0 commit comments

Comments
 (0)