forked from cockroachdb/pebble
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sstable: fix error path in writer.Close
`Close()` records any error encountered and exits early if called again. One of the return paths was not setting `w.err`, possibly causing the panic in github.com/cockroachdb/cockroach/issues/97350. This change fixes this and improves the structure of the function - instead of each exit path having to set `w.err`, we set it in the deferred function.
- Loading branch information
1 parent
fdf055d
commit bb5f55b
Showing
1 changed file
with
23 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters