Skip to content

Commit

Permalink
solve ctx is nil when use IndexPattern
Browse files Browse the repository at this point in the history
  • Loading branch information
andy committed Aug 13, 2024
1 parent a6d2d26 commit 7177cda
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion service/bulkmigrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,14 @@ func (m *BulkMigrator) WithPatternIndexes(pattern string) *BulkMigrator {
}

newBulkMigrator := &BulkMigrator{
ctx: m.ctx,
SourceES: m.SourceES,
TargetES: m.TargetES,
Parallelism: m.Parallelism,
IndexPairMap: m.IndexPairMap,
Error: m.Error,
ScrollSize: m.ScrollSize,
ScrollTime: m.ScrollTime,
}

var filterIndexes []string
Expand All @@ -183,7 +185,7 @@ func (m *BulkMigrator) WithPatternIndexes(pattern string) *BulkMigrator {
return newBulkMigrator
}

var newIndexPairsMap map[string]*config.IndexPair
newIndexPairsMap := make(map[string]*config.IndexPair)
for _, index := range filterIndexes {
indexPair := &config.IndexPair{
SourceIndex: index,
Expand Down

0 comments on commit 7177cda

Please sign in to comment.