[SERVER-32776] Refresh rollback id cache on increment Created: 18/Jan/18  Updated: 30/Oct/23  Resolved: 13/Feb/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.6.2
Fix Version/s: 3.6.4, 3.7.3

Type: Improvement Priority: Major - P3
Reporter: Judah Schvimer Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-28988 add ReplicationProcess and use it to ... Closed
is related to SERVER-31662 Initialize rbid to 1 and log when it ... Closed
is related to SERVER-15820 Include rollback ID in 'repl' section... Closed
is related to SERVER-27659 persist Rollback ID and read it at st... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2018-02-12, Repl 2018-02-26
Participants:

 Description   

We currently empty the cache on increment and then refresh it when we call getRollbackID next. This means that server status calls can go to disk when the cache needs to be refreshed. Incrementing the rollback id happens during rollback (which is slow and rare) so it does not matter if we go to storage one more time. We should also refresh the cache on startup for the same reason.



 Comments   
Comment by Githook User [ 28/Mar/18 ]

Author:

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

Message: SERVER-32776 ReplicationCoordinator::prepareReplMetadata no longer requires OperationContext

The OperationContext was previously used to retrieve the rollback ID from the
ReplicationProcess.

(cherry picked from commit fab8bda84690299be8cce769309f4711484b3508)
Branch: v3.6
https://github.com/mongodb/mongo/commit/de3c132784f2e946753410059e77cd642f874735

Comment by Githook User [ 28/Mar/18 ]

Author:

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

Message: SERVER-32776 ReplicationProcess::getRollbackID() no longer reads from storage to refresh cached rollback id

(cherry picked from commit 6353f3613ac73d67bc064f7bbc81f949e6542838)
Branch: v3.6
https://github.com/mongodb/mongo/commit/2bbac018f4095d9add1c2a70858c9964efc8fd15

Comment by Githook User [ 28/Mar/18 ]

Author:

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

Message: SERVER-32776 add ReplicationProcess::refreshRollbackID()

This forces the ReplicationProcess to update its cached rollback ID from storage.

(cherry picked from commit ac82e9363affcbeedaec7a11d4539f58357cecda)
Branch: v3.6
https://github.com/mongodb/mongo/commit/a1ea122c108f05176b629f2e230c40390f47de01

Comment by Githook User [ 28/Mar/18 ]

Author:

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

Message: SERVER-32776 ReplicationProcess refreshes rollback ID cache on increment and initialization

(cherry picked from commit 9a8b7eab7bc024c004a2a791de556011a1cc1bfa)
Branch: v3.6
https://github.com/mongodb/mongo/commit/9faf791136d469deb1123af5d2a21cb067fb9c7b

Comment by Githook User [ 13/Feb/18 ]

Author:

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

Message: SERVER-32776 ReplicationCoordinator::prepareReplMetadata no longer requires OperationContext

The OperationContext was previously used to retrieve the rollback ID from the
ReplicationProcess.
Branch: master
https://github.com/mongodb/mongo/commit/fab8bda84690299be8cce769309f4711484b3508

Comment by Githook User [ 13/Feb/18 ]

Author:

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

Message: SERVER-32776 ReplicationProcess::getRollbackID() no longer reads from storage to refresh cached rollback id
Branch: master
https://github.com/mongodb/mongo/commit/6353f3613ac73d67bc064f7bbc81f949e6542838

Comment by Githook User [ 13/Feb/18 ]

Author:

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

Message: SERVER-32776 add ReplicationProcess::refreshRollbackID()

This forces the ReplicationProcess to update its cached rollback ID from storage.
Branch: master
https://github.com/mongodb/mongo/commit/ac82e9363affcbeedaec7a11d4539f58357cecda

Comment by Githook User [ 12/Feb/18 ]

Author:

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

Message: SERVER-32776 ReplicationProcess refreshes rollback ID cache on increment and initialization
Branch: master
https://github.com/mongodb/mongo/commit/9a8b7eab7bc024c004a2a791de556011a1cc1bfa

Comment by Spencer Brody (Inactive) [ 18/Jan/18 ]

This is only an issue in 3.6+, in 3.4 and prior the rbid was solely in memory, there was no on-disk representation.

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