This repository has been archived on 2022-07-30. You can view files and clone it, but cannot push or open issues/pull-requests.
mdb/database_ex_test.go

14 lines
202 B
Go
Raw Normal View History

2022-07-26 12:02:32 +00:00
package mdb
import "time"
2022-07-26 15:13:16 +00:00
func (db *Database) WaitForWAL() {
2022-07-26 12:02:32 +00:00
for {
status := db.WALStatus()
2022-07-26 12:13:41 +00:00
if status.MaxSeqNumWAL == status.MaxSeqNumKV {
2022-07-26 12:02:32 +00:00
return
}
time.Sleep(100 * time.Millisecond)
}
}