File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,13 @@ func (d DeferredBatchOp) Finish() error {
151151//
152152// # Internal representation
153153//
154+ // WARNING: Do not remove the ability to handle older internal
155+ // representations, without thinking through the consequences in CockroachDB.
156+ // Specifically, CockroachDB can have unapplied raft log entries that contain
157+ // encoded Pebble batches, and without a CockroachDB-level below-Raft
158+ // migration they can correspond to arbitrarily old binary versions. Pebble
159+ // needs to be able to successfully apply such batches.
160+ //
154161// The internal batch representation is a contiguous byte buffer with a fixed
155162// 12-byte header, followed by a series of records.
156163//
Original file line number Diff line number Diff line change @@ -308,6 +308,13 @@ func (v FormatMajorVersion) MaxTableFormat() sstable.TableFormat {
308308
309309// MinTableFormat returns the minimum sstable.TableFormat that can be used at
310310// this FormatMajorVersion.
311+ //
312+ // WARNING: Do not bump this to a higher value without thinking through the
313+ // consequences in CockroachDB. Specifically, CockroachDB can have unapplied
314+ // raft log entries that correspond to sstable ingestions, and without a
315+ // CockroachDB-level below-Raft migration they can correspond to arbitrarily
316+ // old binary versions. Pebble needs to be able to successfully ingest such
317+ // sstables.
311318func (v FormatMajorVersion ) MinTableFormat () sstable.TableFormat {
312319 _ = v .resolveDefault ()
313320 return sstable .TableFormatPebblev1
You can’t perform that action at this time.
0 commit comments