Fix db lookup for wal file

This commit is contained in:
Ben Johnson
2020-11-11 16:45:02 -07:00
parent 231b41b29f
commit bbcdb30cb3
3 changed files with 25 additions and 2 deletions

8
db.go
View File

@@ -244,7 +244,13 @@ func (db *DB) shadowWALExists() (bool, error) {
// contents of the database page.
func (db *DB) recoverShadowWALOnly() error {
db.logger.Printf("recovering: shadow WAL only")
panic("TODO")
// TODO: Verify last page in shadow WAL matches data in DB.
db.processedWALByteN = 0
db.pendingWALByteN = 0
return nil
}
// recoverRealAndShadowWALs verifies the last page of the real & shadow WALs match.