Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-62915

Unify all serialisation formats for ChunkVersion

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible

      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.

            Assignee:
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: