[SERVER-28205] Recoverable Rollback: Extend TTL-related collMod oplog entry to include previous expiration Created: 06/Mar/17  Updated: 06/Dec/17  Resolved: 25/Apr/17

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.5.7

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

Issue Links:
Related
is related to SERVER-24239 Add support for building indices with... Closed
is related to SERVER-28740 Recoverable Rollback: make collMod op... Closed
is related to SERVER-27096 applyOps should validate its ops to e... Backlog
Backwards Compatibility: Fully Compatible
Sprint: Repl 2017-03-06, Repl 2017-03-27, Repl 2017-04-17, Repl 2017-05-08
Participants:

 Description   

When the expiration on a TTL index is updated, the oplog entry contains the final expiration requested by the user. In the context of rollback, it would be desirable to include the previous expiration so that we can rollback the changes to the TTL index without any communication with the sync source.

We could encode the previous setting in the o2 field, and also make sure to record the index name in addition as the previous expiration.



 Comments   
Comment by Githook User [ 25/Apr/17 ]

Author:

{u'username': u'will62794', u'name': u'William Schultz', u'email': u'william.schultz@mongodb.com'}

Message: SERVER-28205 SERVER-28740 Make collMod oplog entries reversible
Branch: master
https://github.com/mongodb/mongo/commit/a956f48537415b3ba74d2b8c2bd1332b6f603dca

Comment by Benety Goh [ 10/Apr/17 ]

Since SERVER-24239 (4caf167), TTL expirations may appear in the oplog with either the index name or key pattern depending on what was requested by the user:

{ "ts" : Timestamp(1491849507, 1), "t" : NumberLong(9), "h" : NumberLong("772043270948543936"), "v" : 2, "op" : "c", "ns" : "test.$cmd", "o" : { "collMod" : "x", "index" : { "keyPattern" : { "b" : 1 }, "expireAfterSeconds" : 120 } } }
{ "ts" : Timestamp(1491849570, 1), "t" : NumberLong(9), "h" : NumberLong("1667500779064680150"), "v" : 2, "op" : "c", "ns" : "test.$cmd", "o" : { "collMod" : "x", "index" : { "name" : "b_1", "expireAfterSeconds" : 180 } } }

Comment by Benety Goh [ 08/Mar/17 ]

We should consider how TTL expiration changes are represented in the oplog when the TTL change is part of a larger set of operations inside an applyOps command. See SERVER-27096

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