Skip to content

pebble: use ReadPropertiesBlock when accessing reader props #4775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 30, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
pebble: close file cache before closing the objstorage provider
It seems that during close, the file cache may attempt to access structures
managed by the objstroage provider during the eviction process, such as sending
to channels used for tracing events. We should close the file cache before the
obj storage provider.
  • Loading branch information
xinhaoz committed May 29, 2025
commit b5fb597339f474c6f0713af79048e320cc85f0aa
4 changes: 2 additions & 2 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -1789,6 +1789,8 @@ func (d *DB) Close() error {
err = firstError(err, errors.Errorf("non-zero zombie blob count: %d", zblobs))
}

err = firstError(err, d.fileCache.Close())

err = firstError(err, d.objProvider.Close())

// If the options include a closer to 'close' the filesystem, close it.
Expand All @@ -1801,8 +1803,6 @@ func (d *DB) Close() error {
err = firstError(err, errors.Errorf("leaked snapshots: %d open snapshots on DB %p", v, d))
}

err = firstError(err, d.fileCache.Close())

return err
}

Expand Down