[SERVER-27055] initial_sync_id_index.js should not use w:2 write to check initial sync is complete Created: 15/Nov/16  Updated: 23/Nov/16  Resolved: 17/Nov/16

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.4.0-rc4, 3.5.1

Type: Bug Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: Tess Avitabile (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-27054 Slave can acknowledge write before in... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: Query 2016-11-21
Participants:
Linked BF Score: 0

 Description   

A {w:2} write is not a good way to test initial sync is complete, because a slave can acknowledge a write before initial sync is complete (SERVER-27054).



 Comments   
Comment by Max Hirschhorn [ 23/Nov/16 ]

Not sure why the githook didn't get triggered...

Author:

{u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}

Message: SERVER-27055 initial_sync_id_index.js should not use w:2 write to check initial sync is complete
Branch: master
https://github.com/mongodb/mongo/commit/229574021f47ec966ba39989b8737ab30400c19c

Comment by Githook User [ 17/Nov/16 ]

Author:

{u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}

Message: SERVER-27055 initial_sync_id_index.js should not use w:2 write to check initial sync is complete
Branch: v3.4
https://github.com/mongodb/mongo/commit/0362de220040e40dc1d5ebe627e32b4b4b02fb8d

Comment by Eric Milkie [ 16/Nov/16 ]

I'm not sure the solution in SERVER-25618 applies to empty collections. I will have to check the code to be sure. There may be something small we can do to fix it.

Comment by Max Hirschhorn [ 16/Nov/16 ]

milkie, I was under the impression that it shouldn't be necessary to perform a w=2 write on each collection and/or database after the issue reported in SERVER-25618 was addressed.

Comment by Eric Milkie [ 16/Nov/16 ]

Technically, slaves do not have an "initial sync" like replica set members do. Instead, they sync new databases and collections over a period of time, purportedly to avoid slamming the master with lots of data copies all at once. Using a w:2 write is a fine way to check to see if a particular collection is synced, but it will only confirm that one collection. If you want to confirm that multiple collections have been synced to a slave, you will have to do w:2 writes on each collection.

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