diff options
author | David Golden <xdg@xdg.me> | 2018-10-04 10:21:33 -0400 |
---|---|---|
committer | David Golden <xdg@xdg.me> | 2018-10-04 10:21:33 -0400 |
commit | 5849932e9f4ce4c2bef9046fbaa21f3465e3d1eb (patch) | |
tree | 4c76fb9eb2ec3118d1153086f06fb5b9ef65269e | |
parent | 2524d2aa24d137b6fa4e48c5f199eefa6e1cadaa (diff) | |
download | mongo-5849932e9f4ce4c2bef9046fbaa21f3465e3d1eb.tar.gz |
Import tools: 38376e791d2c264b377ba3115344c860c146e0b2 from branch v3.4
ref: a486a2aad1..38376e791d
for: 3.4.18
TOOLS-2102 Mongorestore does not check for errors decoding the oplog.bson file
-rw-r--r-- | src/mongo/gotools/import.data | 2 | ||||
-rw-r--r-- | src/mongo/gotools/mongorestore/oplog.go | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/gotools/import.data b/src/mongo/gotools/import.data index 6372c20bf10..4b4c75c79f0 100644 --- a/src/mongo/gotools/import.data +++ b/src/mongo/gotools/import.data @@ -1,5 +1,5 @@ { - "commit": "a486a2aad18c47a9bc6c16e65672690888210832", + "commit": "38376e791d2c264b377ba3115344c860c146e0b2", "github": "mongodb/mongo-tools.git", "vendor": "tools", "branch": "v3.4" diff --git a/src/mongo/gotools/mongorestore/oplog.go b/src/mongo/gotools/mongorestore/oplog.go index 68e24d20b8f..010f16f410e 100644 --- a/src/mongo/gotools/mongorestore/oplog.go +++ b/src/mongo/gotools/mongorestore/oplog.go @@ -93,6 +93,9 @@ func (restore *MongoRestore) RestoreOplog() error { } log.Logvf(log.Info, "applied %v ops", totalOps) + if err := bsonSource.Err(); err != nil { + return fmt.Errorf("error reading oplog bson input: %v", err) + } return nil } |