cloud: create and use an objstorage.Writable writer wrapper #153056
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, CRDB code interacting with the pebble SST writer used a wrapper that no-op'd Finish/Abort calls on the cloud object. This caused us to write invalid SSTs to cloud storage when we would have otherwise aborted the write.
Implementing Finish/Abort also lets us clean up some of the lifetime handling. Creating an SST writer normally takes ownership of the object. But since we no-op'd the cleanup methods, we had to hold onto the object and manually Close it to trigger the flush.
Issue: #153055
Epic: CRDB-53946
Release note: none