mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etctserver: add failpoints walBeforeSync and walAfterSync
Signed-off-by: Benjamin Wang <wachao@vmware.com>
This commit is contained in:
@@ -949,7 +949,10 @@ func (w *WAL) Save(st raftpb.HardState, ents []raftpb.Entry) error {
|
||||
}
|
||||
if curOff < SegmentSizeBytes {
|
||||
if mustSync {
|
||||
return w.sync()
|
||||
// gofail: var walBeforeSync struct{}
|
||||
err = w.sync()
|
||||
// gofail: var walAfterSync struct{}
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user