[SERVER-13165] WriteBatchExecutor doesn't handle primary demotion when recovering from yield during inserts Created: 12/Mar/14  Updated: 11/Jul/16  Resolved: 19/Mar/14

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: 2.6.0-rc1
Fix Version/s: 2.6.0-rc2

Type: Bug Priority: Major - P3
Reporter: Andy Schwerin Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

Any time a thread acquires the write lock to perform a user operation on a non-local database, it needs to confirm that the node is primary. When WBE::execInserts does periodic yielding, it is not performing this check, leading to potential fatal errors.



 Comments   
Comment by Githook User [ 19/Mar/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-13163/SERVER-13165 Target index creations correctly in the oplog on insert write commands.

(cherry picked from commit d9e4242d7f8c2631834a8b84cddf2f98cd1971b3)
Branch: v2.6
https://github.com/mongodb/mongo/commit/670a13d965a5bf949e33309ef47b49a23326a59c

Comment by Githook User [ 19/Mar/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-13163/SERVER-13165 Target index creations correctly in the oplog on insert write commands.
Branch: master
https://github.com/mongodb/mongo/commit/d9e4242d7f8c2631834a8b84cddf2f98cd1971b3

Comment by Githook User [ 19/Mar/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-13163/SERVER-13165 Assign fassert codes.
Branch: master
https://github.com/mongodb/mongo/commit/f005fc6b5275bda6b6988413d83b61aab099ff63

Comment by Githook User [ 19/Mar/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-13163/SERVER-13165 Assign fassert codes.
Branch: v2.6
https://github.com/mongodb/mongo/commit/11e8a1d1b7d58b710a8a6f59e507dafcec01f247

Comment by Githook User [ 19/Mar/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-13163/SERVER-13165 Refactor implementation of insert write command in mongod.

The goal of the refactoring is to clarify the control flow of the batch
execution of inserts, and in so doing to cleanly handle PageFaultExceptions,
properly handle demotion to secondary, correctly profile individual document
insertions within the batch, and correctly attribute lock hold and acquisition
time to those individual insertions.

It is also intended that this refactoring will resolve memory leaks in the
insert code path, by more carefully tracking ownership of WriteErrorDetail
objects throughout the WriteBatchExecutor class.
Branch: v2.6
https://github.com/mongodb/mongo/commit/2758187dd41024a8f93fddc7edfc223eccf4a1ce

Comment by Githook User [ 19/Mar/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-13163/SERVER-13165 Refactor implementation of insert write command in mongod.

The goal of the refactoring is to clarify the control flow of the batch
execution of inserts, and in so doing to cleanly handle PageFaultExceptions,
properly handle demotion to secondary, correctly profile individual document
insertions within the batch, and correctly attribute lock hold and acquisition
time to those individual insertions.

It is also intended that this refactoring will resolve memory leaks in the
insert code path, by more carefully tracking ownership of WriteErrorDetail
objects throughout the WriteBatchExecutor class.
Branch: master
https://github.com/mongodb/mongo/commit/7300f943ab5423dfcf8ad66d916648a86f861b47

Generated at Thu Feb 08 03:30:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.