Skip to content

Commit

Permalink
fix memiavl
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Mar 3, 2025
1 parent f1313c3 commit 693d382
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions memiavl/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,13 @@ func (db *DB) checkBackgroundSnapshotRewrite() error {
db.snapshotRewriteCancel = nil

if result.mtree == nil {
// background snapshot rewrite failed
return fmt.Errorf("background snapshot rewriting failed: %w", result.err)
if result.err != nil {
// background snapshot rewrite failed
return fmt.Errorf("background snapshot rewriting failed: %w", result.err)
}

Check warning on line 449 in memiavl/db.go

View check run for this annotation

Codecov / codecov/patch

memiavl/db.go#L446-L449

Added lines #L446 - L449 were not covered by tests

// background snapshot rewrite don't success, but no error to propogate, ignore it.

Check failure on line 451 in memiavl/db.go

View workflow job for this annotation

GitHub Actions / Run golangci-lint

`propogate` is a misspelling of `propagate` (misspell)
return nil

Check warning on line 452 in memiavl/db.go

View check run for this annotation

Codecov / codecov/patch

memiavl/db.go#L452

Added line #L452 was not covered by tests
}

// wait for potential pending wal writings to finish, to make sure we catch up to latest state.
Expand Down

0 comments on commit 693d382

Please sign in to comment.