feat: migration skip exists docs with bulk operation

This commit is contained in:
hardy 2024-02-04 17:29:12 +08:00 committed by hardy
parent 00dfa9ed5d
commit a338af5c9a
2 changed files with 18 additions and 18 deletions

View File

@ -134,7 +134,7 @@ func (p *processor) handleSplitSubTask(taskItem *task.Task) error {
"batch_size": cfg.Source.BatchSize,
"indices": indexName,
"elasticsearch": sourceClusterID,
"bulk_create_operation": cfg.Target.Bulk.CreateOperation,
"bulk_operation": cfg.Target.Bulk.Operation,
"queue": util.MapStr{
"name": scrollID,
"labels": util.MapStr{
@ -191,7 +191,7 @@ func (p *processor) handleSplitSubTask(taskItem *task.Task) error {
"batch_size_in_docs": cfg.Target.Bulk.BatchSizeInDocs,
"invalid_queue": "bulk_indexing_400",
"compress": cfg.Target.Bulk.Compress,
"bulk_create_operation": cfg.Target.Bulk.CreateOperation,
"bulk_operation": cfg.Target.Bulk.Operation,
},
"max_worker_size": cfg.Target.Bulk.MaxWorkerSize,
"num_of_slices": cfg.Target.Bulk.SliceSize,

View File

@ -92,7 +92,7 @@ type IndexMigrationBulkConfig struct {
IdleTimeoutInSeconds int `json:"idle_timeout_in_seconds"`
SliceSize int `json:"slice_size"`
Compress bool `json:"compress"`
CreateOperation bool `json:"bulk_create_operation"`
Operation string `json:"operation"`
}
type IndexMigrationTargetConfig struct {