Skip to content

Commit c425c02

Browse files
craig[bot]RaduBerindejasonlmfong
committed
153285: storage: use minimum supported version for TransportSSTWriter r=RaduBerinde a=RaduBerinde MakeTransportSSTWriter is used when evaluating export requests. These requests can be issued by non-system tenants which can run older binaries. Since we have currently have no way of knowing what binary version that is, we must emit at the minimum supported version. Fixes #152723 This reverts one aspect of #151176 153287: authors: add jasonlmfong to authors r=jasonlmfong a=jasonlmfong Epic: None Release note: None Co-authored-by: Radu Berinde <[email protected]> Co-authored-by: Jason Fong <[email protected]>
3 parents 4713613 + be3e9d9 + 6c499d8 commit c425c02

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ Jasmine Sun <[email protected]> <[email protected]>
241241
242242
Jason Chen <[email protected]>
243243
Jason E. Aten <[email protected]>
244+
244245
Jason Young <[email protected]>
245246
246247
Jay Kominek <[email protected]>

pkg/storage/sst_writer.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,13 @@ func makeSSTRewriteOptions(
117117
// scanned and their keys inserted into new sstables (NB: constructed using
118118
// MakeIngestionSSTWriter) that ultimately are uploaded to object storage.
119119
func MakeTransportSSTWriter(ctx context.Context, cs *cluster.Settings, f io.Writer) SSTWriter {
120-
format := minPebbleFormatVersionInCluster(cs.Version.ActiveVersion(ctx).Version).MaxTableFormat()
120+
// MakeTransportSSTWriter is used to evaluate export requests. The export
121+
// requests could be issued by a non-system tenant with an older binary, so we
122+
// must emit at the minimum supported version.
123+
//
124+
// TODO(radu): ideally the tenant would be able to specify the desired format
125+
// version (#153283).
126+
format := MinimumSupportedFormatVersion.MaxTableFormat()
121127

122128
opts := DefaultPebbleOptions().MakeWriterOptions(0, format)
123129

0 commit comments

Comments
 (0)