add param use_even_strategy

This commit is contained in:
liugq 2023-12-19 17:43:43 +08:00
parent f053282754
commit 69aaebd3ea
2 changed files with 3 additions and 0 deletions

View File

@ -209,6 +209,7 @@ func (p *processor) splitMajorMigrationTask(taskItem *task.Task) error {
FieldName: index.Partition.FieldName, FieldName: index.Partition.FieldName,
FieldType: index.Partition.FieldType, FieldType: index.Partition.FieldType,
Step: index.Partition.Step, Step: index.Partition.Step,
UseEvenStrategy: index.Partition.UseEvenStrategy,
} }
if source.QueryDSL != nil { if source.QueryDSL != nil {
partitionQ.Filter = source.QueryDSL partitionQ.Filter = source.QueryDSL

View File

@ -36,6 +36,8 @@ type IndexPartition struct {
FieldType string `json:"field_type"` FieldType string `json:"field_type"`
FieldName string `json:"field_name"` FieldName string `json:"field_name"`
Step interface{} `json:"step"` Step interface{} `json:"step"`
//only worked when field type equals number
UseEvenStrategy bool `json:"use_even_strategy"`
} }
type IndexIncremental struct { type IndexIncremental struct {