14 lines
202 B
Go
14 lines
202 B
Go
|
package mdb
|
||
|
|
||
|
import "time"
|
||
|
|
||
|
func (db *Database) WaitForWAL() {
|
||
|
for {
|
||
|
status := db.WALStatus()
|
||
|
if status.MaxSeqNumWAL == status.MaxSeqNumKV {
|
||
|
return
|
||
|
}
|
||
|
time.Sleep(100 * time.Millisecond)
|
||
|
}
|
||
|
}
|