[SERVER-19905] Change optime "term" field to "t", and consolidate parsing Created: 12/Aug/15  Updated: 05/Mar/18  Resolved: 17/Sep/15

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

Type: Task Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Matt Dannenberg
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-33659 add no-trace variant fassertStatusOK ... Closed
Backwards Compatibility: Fully Compatible
Sprint: RPL 9 (09/18/15)
Participants:

 Description   

In OpTime we persist term as the "t" field, but in other places it uses "term". We should change all places we use to "term" and put all parsing/validation into the OpTime class.

For ref: https://github.com/mongodb/mongo/blob/master/src/mongo/bson/util/bson_extract.cpp#L108



 Comments   
Comment by Githook User [ 17/Sep/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-19905 SERVER-19855 Put config server optime into its own subobject when sending with commands
Branch: master
https://github.com/mongodb/mongo/commit/3619498a9f4ff383cdd546a320abbec11a511bc6

Comment by Githook User [ 17/Sep/15 ]

Author:

{u'username': u'dannenberg', u'name': u'matt dannenberg', u'email': u'matt.dannenberg@10gen.com'}

Message: SERVER-19905 consistently use t as the field name for the term portion of an OpTime
Branch: master
https://github.com/mongodb/mongo/commit/b7ac467dbe15275ffcd51f446f9b42491f29e922

Comment by Siyuan Zhou [ 12/Aug/15 ]

I'll also rename -1 to kUninitializedTerm and 0 to kInitialTerm. In SERVER-19765, the default term at startup will be -1 (uninitialized term). startReplication() will restore the correct current term from log and last vote for protocol version 1.

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