File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,17 @@ func (s *Scorch) ForceMerge(ctx context.Context,
209209func (s * Scorch ) parseMergePlannerOptions () (* mergeplan.MergePlanOptions ,
210210 error ) {
211211 mergePlannerOptions := mergeplan .DefaultMergePlanOptions
212+
213+ po , err := s .parsePersisterOptions ()
214+ if err != nil {
215+ return nil , err
216+ }
217+ // by default use the MaxSizeInMemoryMergePerWorker from the persister option
218+ // as the FloorSegmentFileSize for the merge planner which would be the
219+ // first tier size in the planning. If the value is 0, then we don't use the
220+ // file size in the planning.
221+ mergePlannerOptions .FloorSegmentFileSize = int64 (po .MaxSizeInMemoryMergePerWorker )
222+
212223 if v , ok := s .config ["scorchMergePlanOptions" ]; ok {
213224 b , err := util .MarshalJSON (v )
214225 if err != nil {
@@ -225,16 +236,6 @@ func (s *Scorch) parseMergePlannerOptions() (*mergeplan.MergePlanOptions,
225236 return nil , err
226237 }
227238 }
228-
229- if mergePlannerOptions .FloorSegmentFileSize == 0 {
230- po , err := s .parsePersisterOptions ()
231- if err != nil {
232- return nil , err
233- }
234-
235- mergePlannerOptions .FloorSegmentFileSize = int64 (po .MaxSizeInMemoryMergePerWorker )
236- }
237-
238239 return & mergePlannerOptions , nil
239240}
240241
You can’t perform that action at this time.
0 commit comments