diff --git a/plugin/task_manager/cluster_migration/cluster_migration.go b/plugin/task_manager/cluster_migration/cluster_migration.go index 27d9c757..b2d06079 100644 --- a/plugin/task_manager/cluster_migration/cluster_migration.go +++ b/plugin/task_manager/cluster_migration/cluster_migration.go @@ -209,6 +209,7 @@ func (p *processor) splitMajorMigrationTask(taskItem *task.Task) error { FieldName: index.Partition.FieldName, FieldType: index.Partition.FieldType, Step: index.Partition.Step, + UseEvenStrategy: index.Partition.UseEvenStrategy, } if source.QueryDSL != nil { partitionQ.Filter = source.QueryDSL diff --git a/plugin/task_manager/model/common.go b/plugin/task_manager/model/common.go index 4bc8512e..343e8382 100644 --- a/plugin/task_manager/model/common.go +++ b/plugin/task_manager/model/common.go @@ -36,6 +36,8 @@ type IndexPartition struct { FieldType string `json:"field_type"` FieldName string `json:"field_name"` Step interface{} `json:"step"` + //only worked when field type equals number + UseEvenStrategy bool `json:"use_even_strategy"` } type IndexIncremental struct {