Skip to content

Commit d3e3d30

Browse files
committed
snaprecv: add comments on MultiSSTWriterOptions fields
1 parent ad9fdc6 commit d3e3d30

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pkg/kv/kvserver/kvstorage/snaprecv/multi_sst_writer.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type MultiSSTWriter struct {
4141
// append(localKeySpans, mvccSSTSpans).
4242
currSpan int
4343
// The approximate size of the SST chunk to buffer in memory on the receiver
44-
// before flushing to disk.
44+
// before flushing to disk. Zero disables explicit flushing.
4545
sstChunkSize int64
4646
// The total size of the key and value pairs (not the total size of the SSTs),
4747
// excluding currSST. Updated on SST finalization.
@@ -64,8 +64,15 @@ type MultiSSTWriter struct {
6464
}
6565

6666
type MultiSSTWriterOptions struct {
67+
// SSTChunkSize is the approximate size of the SST chunk buffer before
68+
// flushing to disk. If zero, there is no explicit flushing until the
69+
// SST is finalized.
6770
SSTChunkSize int64
68-
MaxSSTSize int64
71+
// MaxSSTSize is the maximum size of an SST containing MVCC/user keys before
72+
// we finalize it and start a new SST. If zero, there is no limit.
73+
//
74+
// This does not affect other SSTs.
75+
MaxSSTSize int64
6976
}
7077

7178
// NewMultiSSTWriter returns an initialized MultiSSTWriter.

0 commit comments

Comments
 (0)