[SERVER-62915] Unify all serialisation formats for ChunkVersion Created: 24/Jan/22  Updated: 29/Oct/23  Resolved: 11/Feb/22

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

Type: Improvement Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Marcos José Grillo Ramirez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-63403 Remove old chunk version parsing format Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

Currently, there are at least 6 different ways to encode a chunk/shard/collection version on the wire, consisting of various combinations of:

<field>: [ <combined major/minor> ], <field>Epoch: [ <OID epoch> ], <field>Timestamp: [ <Timestamp>]
<field>: [ <combined major/minor>, <OID epoch>, <Timestamp> ]
<field>: { 0: <combined major/minor>, 1: <OID epoch>, 2: <Timestamp> }

We should introduce one BSON-based format with the following fields:

{
  t: <Collection timestamp>,
  e: <Collection epoch OID>,
  i: <Index timestamp>,
  v: <Collection major|minor version encoded as uint64_t>,
}

As part of this ticket, we should only remain with one deserialisaton function, which understands all the old formats and the new format, but still writes only the old formats. That way in 6.1 we can throw out writing of the old formats entirely.



 Comments   
Comment by Githook User [ 11/Feb/22 ]

Author:

{'name': 'Marcos José Grillo Ramirez', 'email': 'marcos.grillo@mongodb.com', 'username': 'm4nti5'}

Message: SERVER-62915 Unify ChunkVersion parsing into a single function
Branch: master
https://github.com/mongodb/mongo/commit/4843a75a41a6f5f61fcd10adcb8a9b4bd07b1800

Generated at Thu Feb 08 05:56:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.