Potential template:
The sharding vector clock (config OpTime, logical clock, databaseVersion, collectionVersion, shardVersion)
- Should include
- What is the type of each of these versions
- How is each version derived (e.g., shardVersion is the max across all chunks owned by the shard, etc)
- What are the processes, at a high level, which advance each version (e.g. writes to the config server advance the config OpTime)
- At a conceptual level, how are config OpTime and logical time gossiped?
- Why is there a config OpTime separate from clusterTime?
- Code references
- Where config OpTime is attached in requests and responses
- Where config OpTime is stored in memory on each node
- Where clusterTime is attached in requests and responses
- Where clusterTime is stored in memory on each node
- An example of where shardVersion and databaseVersion are attached in egress requests and parsed in ingress requests
- Where collectionVersion is used to do an incremental refresh