-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.4.9, 3.6.0-rc0
-
Component/s: None
-
None
-
v4.2
Some known issues may cause mongorestore failed when replay oplog: SERVER-24231. In the latest versions(3.4.9 and 3.6.0-rc0) of mongorestore, it will panic with the message below if it encounters an error while replaying oplog:
panic: send on closed channel
I have uploaded an test archive that will help reproduce the problem. You can simply reproduce the problem using the following command:
mongorestore --port 27017 --drop --archive=uq_idx.ar --oplogReplay --gzip
*The root cause and how to resolve:
*The restore goroutine encounters the applyOps error and return early, which cause the intent file's close() method being called. So readLenChan is closed in RegularCollectionReceiver.close() while the demux goroutine is still sending data on it. In the earlier version of mongorestore(3.2.11), there is another regularCollectionSender so this problem does not exist. I has a solution to fix this problem, but I don't think the patch is beautiful enough. If you are interested, we can discuss here.
- is depended on by
-
TOOLS-2424 Backport 'TOOLS-1826 mongorestore panic in archive mode when replay oplog failed'
- Closed
- is duplicated by
-
TOOLS-2407 mongorestore panic: send on closed channel
- Closed