Operational Defect Database

BugZero found this defect 2457 days ago.

MongoDB | 389666

[SERVER-29431] initialsync.js does not verify that initial sync succeeds

Last update date:

10/30/2023

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

3.4.9

3.5.13

Description:

Info

initialsync.js creates a replica set with nodes of one version, then adds a node of a higher/lower version, and tests that initial sync succeeds on the new node. However, the test erroneously passes when initial sync does not succeed on the 3.4 branch: [js_test:initialsync] 2017-06-02T15:45:30.242+0000 d20015| 2017-06-02T15:45:30.242+0000 I REPL [rsSync] initial sync cloning db: admin [js_test:initialsync] 2017-06-02T15:45:30.246+0000 d20015| 2017-06-02T15:45:30.245+0000 I INDEX [rsSync] build index on: admin.system.version properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "admin.system.version" } [js_test:initialsync] 2017-06-02T15:45:30.246+0000 d20015| 2017-06-02T15:45:30.245+0000 I INDEX [rsSync] building index using bulk method; build may temporarily use up to 500 megabytes of RAM [js_test:initialsync] 2017-06-02T15:45:30.246+0000 d20015| 2017-06-02T15:45:30.245+0000 I INDEX [rsSync] build index done. scanned 1 total records. 0 secs [js_test:initialsync] 2017-06-02T15:45:30.247+0000 d20015| 2017-06-02T15:45:30.245+0000 I REPL [rsSync] initial sync cloning db: foo [js_test:initialsync] 2017-06-02T15:45:30.248+0000 d20015| 2017-06-02T15:45:30.247+0000 I INDEX [rsSync] build index on: foo.foo properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "foo.foo" } [js_test:initialsync] 2017-06-02T15:45:30.248+0000 d20015| 2017-06-02T15:45:30.247+0000 I INDEX [rsSync] building index using bulk method; build may temporarily use up to 500 megabytes of RAM [js_test:initialsync] 2017-06-02T15:45:30.249+0000 d20015| 2017-06-02T15:45:30.247+0000 I INDEX [rsSync] build index done. scanned 25 total records. 0 secs [js_test:initialsync] 2017-06-02T15:45:30.249+0000 d20015| 2017-06-02T15:45:30.247+0000 I REPL [rsSync] initial sync data copy, starting syncup [js_test:initialsync] 2017-06-02T15:45:30.249+0000 d20015| 2017-06-02T15:45:30.247+0000 I REPL [rsSync] oplog sync 1 of 3 [js_test:initialsync] 2017-06-02T15:45:30.250+0000 d20015| 2017-06-02T15:45:30.247+0000 I REPL [rsSync] oplog sync 2 of 3 [js_test:initialsync] 2017-06-02T15:45:30.250+0000 d20015| 2017-06-02T15:45:30.247+0000 I REPL [rsSync] initial sync building indexes [js_test:initialsync] 2017-06-02T15:45:30.250+0000 d20015| 2017-06-02T15:45:30.247+0000 I REPL [rsSync] initial sync cloning indexes for : admin [js_test:initialsync] 2017-06-02T15:45:30.251+0000 d20015| 2017-06-02T15:45:30.248+0000 I STORAGE [rsSync] copying indexes for: { name: "system.version", type: "collection", options: {}, info: { readOnly: false }, idIndex: { v: 1, key: { _id: 1 }, name: "_id_", ns: "admin.system.version" } } [js_test:initialsync] 2017-06-02T15:45:30.252+0000 d20015| 2017-06-02T15:45:30.250+0000 E REPL [rsSync] 22 Attempt to use a decimal BSON type when experimental decimal server support is not currently enabled. [js_test:initialsync] 2017-06-02T15:45:30.252+0000 d20015| 2017-06-02T15:45:30.250+0000 E REPL [rsSync] initial sync attempt failed, 9 attempts remaining

Top User Comments

ramon.fernandez commented on Thu, 24 Aug 2017 20:27:00 +0000: Author: {'username': u'will62794', 'name': u'William Schultz', 'email': u'william.schultz@mongodb.com'} Message:SERVER-29431 Add library for multi version initial sync tests (cherry picked from commit 45d595886839fb1ebf153f338c65011f1874be6d) Branch:v3.4 https://github.com/mongodb/mongo/commit/d78c225444bf4ab93e8cbe824f622f7d8940bd8d ramon.fernandez commented on Thu, 24 Aug 2017 13:44:38 +0000: Author: {'username': u'will62794', 'name': u'William Schultz', 'email': u'william.schultz@mongodb.com'} Message:SERVER-29431 Add library for multi version initial sync tests Branch:master https://github.com/mongodb/mongo/commit/45d595886839fb1ebf153f338c65011f1874be6d william.schultz commented on Wed, 23 Aug 2017 22:02:09 +0000: Improvements to the multiversion initial sync tests were committed in master. Those changes will fix the problems on the 3.4 branch once they are backported. (BACKPORT-1079). william.schultz commented on Tue, 22 Aug 2017 21:29:42 +0000: On the 3.4 branch the multiVersion/initialsync.js test will run initial sync on a 3.2 node with a 3.4 sync source. The test will erroneously pass even if initial sync fails because we are only calling awaitReplication in the JS test as a way to check that initial sync completed. In version 3.2, we may complete the cloning phase and oplog application phase, and then move on to building indexes. We can see this point in one of the test logs. By this point of initial sync, we may have already set our optime to be up to date with the sync source, so checking the op time is not a correct way to determine initial sync success. We should be waiting until the node transitions into SECONDARY state.

Additional Resources / Links

Share:

BugZero Risk Score

Coming soon

Status

Closed

Have you been affected by this bug?

cost-cta-background

Do you know how much operational outages are costing you?

Understand the cost to your business and how BugZero can help you reduce those costs.

Discussion

Login to read and write comments.

Have you ever...

had your data corrupted from a

VMware

bug?

Search:

...