Should ideally be implemented using IDL for parsing and serialization. For the value-add functionality such as incrementing the version, it is alright to create a class which inherits the generated IDL parser class.
The DatabaseVersion should have 2 fields:
- uuid - UUID, indicating the incarnation of the database
- version - Int32 which gets bumped whenever movePrimary is called
The DatabaseVersion class should be made to accept the UUID and version as part of the constructor and should only expose an increment method.
This ticket should also include work to assign the DatabaseVersion whenever a new DatabaseType entry is created.
- is depended on by
-
SERVER-32610 Include databaseVersion when targeting by primary shard in paths that use buildVersionedRequestsForTargetedShards()
- Closed