[DOCS-11360] [TOOLS] Clarify that mongorestore does not support concurrent restoration Created: 08/Feb/18  Updated: 22/Jan/24

Status: Backlog
Project: Documentation
Component/s: Server, tools
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Alex Hu Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: backlog, replication, request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

mongorestore version: r3.4.10
git version: 078f28920cb24de0dd479b5ea6c66c644f6326e9
Go version: go1.7
os: linux
arch: amd64
compiler: gc
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013


Participants:
Days since reply: 45 weeks, 2 days ago

 Description   

Use mongodump/mongorestore to migrate data from many standalone mongod instances to a central replica set.
The dump/restore processes are on the air by using --archive option, and all processes run simultaneously.
Below error may raised by mongorestore occasionally but not always.

Failed: xxdb.xxcollection: error running create command: collection already exists



 Comments   
Comment by Ashley Brown [ 27/Mar/23 ]

Hi tim.fogarty@mongodb.com, could you confirm this is still relevant? Otherwise we'll close. Thanks!

Comment by David Golden [ 13/Mar/23 ]

Defering to tim.fogarty@mongodb.com 

Comment by Ashley Brown [ 13/Mar/23 ]

Hi david.golden@mongodb.com, is this still relevant? If not, we'll close. Thanks!

Comment by David Golden [ 27/Feb/18 ]

Hi, Alex. We don't support concurrent restoration. I'm going to move this to the docs project so that can be clarified.

Comment by Alex Hu [ 12/Feb/18 ]

Hi Mark,
I couldn't forward you the raw output of this case, because I miss to save the logs and after many retries, cannot reproduce it.

I think the reason maybe createCollection + insertData is not in a server side transaction.

The scenario is:

  1. There is no target database, target collection (db.collection) in the target mongo replica set.
  2. To restore data to the db.collection simultaneously.
  3. This error raised.

I suspect that one instance checked and found db.collection didn't exist, then try to create it before insert data while another instance try to do the same thing. Since check + create is neither a server-side transaction nor in a critical section.

Comment by Mark Agarunov [ 09/Feb/18 ]

Hello huyingming,

Thank you for the report. To get a better idea of what may be causing this, could you please provide the complete logs from the affected mongod node(s) as well as the complete output from mongorestore? This should give us some insight into what may be causing this behavior.

Thanks,
Mark

Generated at Thu Feb 08 08:02:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.