Skip to content

Commit e8ea42b

Browse files
committed
CBG-5457 Use 64 partitions for resync by default
1 parent 42c77c9 commit e8ea42b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

db/background_mgr_resync_dcp.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ import (
3030
// Resync Implementation of Background Manager Process using DCP stream
3131
// =====================================================================
3232

33+
const DefaultResyncPartitions = 64
34+
3335
type ResyncManagerDCP struct {
3436
db *DatabaseContext
3537
docsProcessedLocal atomic.Int64 // number of documents processed locally on this node since the last start or resume of resync
@@ -415,7 +417,7 @@ func (r *ResyncManagerDCP) Run(ctx context.Context, options ResyncOptions, persi
415417
if db.Options.UnsupportedOptions != nil && db.Options.UnsupportedOptions.ResyncPartitions != nil && *db.Options.UnsupportedOptions.ResyncPartitions > 0 {
416418
partitionCount = *db.Options.UnsupportedOptions.ResyncPartitions
417419
} else {
418-
partitionCount = db.Options.ImportOptions.ImportPartitions
420+
partitionCount = DefaultResyncPartitions
419421
}
420422
base.DebugfCtx(ctx, base.KeyAll, "Using %d partitions for resync", partitionCount)
421423

0 commit comments

Comments
 (0)