Skip to content

Commit 571dc2c

Browse files
Default to no threading to be safe, instead of = 1
1 parent f71685b commit 571dc2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

MongoBackup/Methods/Dumper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ def wait(self):
6868

6969
def run(self):
7070
# decide how many parallel dump workers to use based on cpu count vs # of shards (if 3.2+)
71-
self.threads_per_dump = 1
71+
self.threads_per_dump = 0
7272
if tuple(self.version.split(".")) >= tuple("3.2.0".split(".")):
73+
self.threads_per_dump = 1
7374
if self.cpu_count > len(self.secondaries):
7475
self.threads_per_dump = int(floor(self.cpu_count / len(self.secondaries)))
7576
else:
76-
self.threads_per_dump = 0
7777
logging.warn("Threading unsupported by mongodump version %s. Use mongodump 3.2.0 or greater to enable per-dump threading." % self.version)
7878

7979
# backup a secondary from each shard:

0 commit comments

Comments
 (0)