[SERVER-27329] Move BackgroundSync::_rollback into rs_rollback.cpp and unit test it Created: 08/Dec/16  Updated: 31/May/17  Resolved: 09/Mar/17

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.4.4, 3.5.5

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Completed:
Sprint: Repl 2017-03-27
Participants:

 Description   

BackgroundSync::_rollback doesn't depend on any member state of BackgroundSync. We should move it into rs_rollback.cpp with the rest of the rollback code and add unit tests for its behavior.



 Comments   
Comment by Githook User [ 31/Mar/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-27329 added unit tests for rollback() (rs_rollback.cpp)

added test case for failing to transition to ROLLBACK
added test case to verify fatal behavior on unrecoverable rollback errors
added test case to verify retry behavior on non-unrecoverabe rollback errors
added test case to verify fatal behavior on shard identity document rollback
added test case for failing to transition to RECOVERING after returning from
syncRollback

(cherry picked from commit 73d3473fb11ff4fbdb404d0c6c409a309ccd7646)
Branch: v3.4
https://github.com/mongodb/mongo/commit/cfa63fc35f0dc0409389cae7c5cc55f453f40dee

Comment by Githook User [ 31/Mar/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-27329 moved BackgroundSync::_rollback() to rs_rollback.cpp

Added optional override for sleepsecs to rollback() for testing.
Cleaned up dependencies on concrete implementations of OplogInterface
and RollbackSource in the SCons configuration.

(cherry picked from commit d44517bc2cfefbc3c1a68626d511f0e2ade559f6)
Branch: v3.4
https://github.com/mongodb/mongo/commit/420e24e32087c79dac3022dd46539c60c329af54

Comment by Githook User [ 31/Mar/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-27329 cleaned up BackgroundSync::_rollback() argument.

Moved dependencies on concrete classes and StorageInterace::get() out of _rollback()
into BackgroundSync::_produce().

This commit also removes the dependency on StorageInterface::get() from syncRollback().

(cherry picked from commit 6d40cc3281fcd71d59db3c29c7a0b21ba0eecdc6)
Branch: v3.4
https://github.com/mongodb/mongo/commit/3e5deb8afbbe68846577bc2676bfe5d62f0e6bc7

Comment by Githook User [ 31/Mar/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-27329 added insertion operator to MemberState

(cherry picked from commit 5471f25a04f8f2617a8737617856e3659f33bca9)
Branch: v3.4
https://github.com/mongodb/mongo/commit/86827cbabc237245fa85e43e965538f2984ed77d

Comment by Githook User [ 09/Mar/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-27329 added unit tests for rollback() (rs_rollback.cpp)

added test case for failing to transition to ROLLBACK
added test case to verify fatal behavior on unrecoverable rollback errors
added test case to verify retry behavior on non-unrecoverabe rollback errors
added test case to verify fatal behavior on shard identity document rollback
added test case for failing to transition to RECOVERING after returning from
syncRollback
Branch: master
https://github.com/mongodb/mongo/commit/73d3473fb11ff4fbdb404d0c6c409a309ccd7646

Comment by Githook User [ 08/Mar/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-27329 moved BackgroundSync::_rollback() to rs_rollback.cpp

Added optional override for sleepsecs to rollback() for testing.
Cleaned up dependencies on concrete implementations of OplogInterface
and RollbackSource in the SCons configuration.
Branch: master
https://github.com/mongodb/mongo/commit/d44517bc2cfefbc3c1a68626d511f0e2ade559f6

Comment by Githook User [ 08/Mar/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-27329 cleaned up BackgroundSync::_rollback() argument.

Moved dependencies on concrete classes and StorageInterace::get() out of _rollback()
into BackgroundSync::_produce().

This commit also removes the dependency on StorageInterface::get() from syncRollback().
Branch: master
https://github.com/mongodb/mongo/commit/6d40cc3281fcd71d59db3c29c7a0b21ba0eecdc6

Comment by Githook User [ 08/Mar/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-27329 added insertion operator to MemberState
Branch: master
https://github.com/mongodb/mongo/commit/5471f25a04f8f2617a8737617856e3659f33bca9

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