-
Type:
Bug
-
Resolution: Won't Do
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Tools and Replicator
A gzipped archive dump of a time-series collection taken with mongodump 100.10.0 cannot be restored with mongorestore 100.17.0. The restore creates the collection successfully but then fails when reading the documents from the archive with:
Failed: test.ts: error restoring from archive ...: reading bson input: error demultiplexing archive; archive io error
No documents are restored (0 document(s) restored successfully).
Environment
- Dump:
- MongoDB server: 8.0.26 (replica set)
- mongodump: 100.10.0
- Restore:
- MongoDB server: 9.0.0 (replica set)
- mongorestore: 100.17.0
Steps to reproduce
- Create a time-series collection and insert some documents:
db.createCollection("ts", {timeseries: {timeField: 'tf', metaField: 'mf'}}) db.ts.insertMany([ { tf: ISODate('2025-03-08T16:40:39.239Z'), mf: "cpu", temp: 45 }, { tf: ISODate('2025-03-08T16:41:20.000Z'), mf: "disk", temp: 30 }, { tf: ISODate('2025-03-08T16:42:30.131Z'), mf: "gpu", temp: 80 }, { tf: ISODate('2025-03-08T16:43:40.283Z'), mf: "cpu", temp: 50, other: true } ])
- Dump with mongodump 100.10.0:
mongodump --gzip --archive=mongo-dump-v80-timeseries-100.10.0.gzip --db=test
- Restore with mongorestore 100.17.0:
mongorestore -vvv --numInsertionWorkersPerCollection=6 --bypassDocumentValidation --gzip --archive=mongo-dump-v80-timeseries-100.10.0.gzip
Verbose restore output
archive tool version `100.10.0`
...
demux namespaceHeader: {test system.buckets.ts false 0}
received `test.system.buckets.ts` from namespaceChan
first non special collection `test.ts` found. The demultiplexer will handle it and the remainder
...
creating collection `test.ts` using options from metadata
using collection options: bson.D{... "timeseries" ... "granularity":"seconds", "bucketMaxSpanSeconds":3600 ...}
restoring `test.ts` from archive ...
using 6 insertion workers
finished restoring `test.ts` (0 documents, 0 failures)
Failed: test.ts: error restoring from archive ...: reading bson input: error demultiplexing archive; archive io error
0 document(s) restored successfully. 0 document(s) failed to restore.
Analysis
The archive stores the data under the system.buckets.ts namespace, but the demultiplexer appears unable to route the bucket documents to the newly created time-series collection, suggesting a backward-compatibility regression in how the 100.17.0 demultiplexer handles archives produced by older (100.10.0) tooling for time-series collections.
- related to
-
SERVER-121768 Stop using custom mongorestore to load data in timeseries performance tests
-
- Blocked
-