@@ -1233,6 +1233,12 @@ type ValueSeparationPolicy struct {
12331233 //
12341234 // MinimumSize must be > 0.
12351235 MinimumSize int
1236+ // MinimumLatencyTolerantSize specifies the minimum size of a value that can
1237+ // be separated into a blob file if said value is a part of a latency tolerant
1238+ // span.
1239+ //
1240+ // MinimumLatencyTolerantSize must be > 0.
1241+ MinimumLatencyTolerantSize int
12361242 // MaxBlobReferenceDepth limits the number of potentially overlapping (in
12371243 // the keyspace) blob files that can be referenced by a single sstable. If a
12381244 // compaction may produce an output sstable referencing more than this many
@@ -1274,8 +1280,7 @@ type ValueSeparationPolicy struct {
12741280 GarbageRatioHighPriority float64
12751281}
12761282
1277- // SpanPolicy contains policies that can vary by key range. The zero value is
1278- // the default value.
1283+ // SpanPolicy contains policies that can vary by key range.
12791284type SpanPolicy struct {
12801285 // Prefer a faster compression algorithm for the keys in this span.
12811286 //
@@ -1342,13 +1347,6 @@ func (vsp *ValueStoragePolicyAdjustment) ContainsOverrides() bool {
13421347 return vsp .OverrideBlobSeparationMinimumSize > 0 || vsp .DisableSeparationBySuffix
13431348}
13441349
1345- // ValueStorageLatencyTolerant is the suggested ValueStoragePolicyAdjustment
1346- // to use for key ranges that can tolerate higher value retrieval
1347- // latency.
1348- var ValueStorageLatencyTolerant = ValueStoragePolicyAdjustment {
1349- OverrideBlobSeparationMinimumSize : 10 ,
1350- }
1351-
13521350// ValueStorageLowReadLatency is the suggested ValueStoragePolicyAdjustment
13531351// to use for key ranges that require low value retrieval latency.
13541352var ValueStorageLowReadLatency = ValueStoragePolicyAdjustment {
@@ -1858,6 +1856,7 @@ func (o *Options) String() string {
18581856 fmt .Fprintln (& buf , "[Value Separation]" )
18591857 fmt .Fprintf (& buf , " enabled=%t\n " , policy .Enabled )
18601858 fmt .Fprintf (& buf , " minimum_size=%d\n " , policy .MinimumSize )
1859+ fmt .Fprintf (& buf , " minimum_latency_tolerant_size=%d\n " , policy .MinimumLatencyTolerantSize )
18611860 fmt .Fprintf (& buf , " max_blob_reference_depth=%d\n " , policy .MaxBlobReferenceDepth )
18621861 fmt .Fprintf (& buf , " rewrite_minimum_age=%s\n " , policy .RewriteMinimumAge )
18631862 fmt .Fprintf (& buf , " garbage_ratio_low_priority=%.2f\n " , policy .GarbageRatioLowPriority )
@@ -2308,6 +2307,10 @@ func (o *Options) Parse(s string, hooks *ParseHooks) error {
23082307 var minimumSize int
23092308 minimumSize , err = strconv .Atoi (value )
23102309 valSepPolicy .MinimumSize = minimumSize
2310+ case "minimum_latency_tolerant_size" :
2311+ var minimumLatencyTolerantSize int
2312+ minimumLatencyTolerantSize , err = strconv .Atoi (value )
2313+ valSepPolicy .MinimumLatencyTolerantSize = minimumLatencyTolerantSize
23112314 case "max_blob_reference_depth" :
23122315 valSepPolicy .MaxBlobReferenceDepth , err = strconv .Atoi (value )
23132316 case "rewrite_minimum_age" :
@@ -2608,6 +2611,9 @@ func (o *Options) Validate() error {
26082611 if policy .MinimumSize <= 0 {
26092612 fmt .Fprintf (& buf , "ValueSeparationPolicy.MinimumSize (%d) must be > 0\n " , policy .MinimumSize )
26102613 }
2614+ if policy .MinimumLatencyTolerantSize <= 0 {
2615+ fmt .Fprintf (& buf , "ValueSeparationPolicy.MinimumLatencyTolerantSize (%d) must be > 0\n " , policy .MinimumLatencyTolerantSize )
2616+ }
26112617 if policy .MaxBlobReferenceDepth <= 0 {
26122618 fmt .Fprintf (& buf , "ValueSeparationPolicy.MaxBlobReferenceDepth (%d) must be > 0\n " , policy .MaxBlobReferenceDepth )
26132619 }
0 commit comments