errose28 opened a new pull request, #9841:
URL: https://github.com/apache/ozone/pull/9841
## Draft since this includes changes from #9832
## What changes were proposed in this pull request?
`ComponentVersion` implementations now contain the following methods:
- `serialize` (from #9832): Should only be called when sending a version
over the network or to disk
- `deserialize`: Should only be called when reading a version from the
network or disk
- `isSupportedBy`: Should be used to check version compatibility between
client and server. This also wraps the deserialization.
- This will also be wrapped by `VersionManager#isAllowed` to check against
apparent version in
HDDS-14732
- For example for the client to check "Does this datanode support read
block streaming?" you would write
```
int dnVersion = dnDetails.getCurrentVersion();
if (HDDSVersion.STREAM_BLOCK_SUPPORT.isSupportedBy(dnVersion)) { ... }
```
All existing client/server version checks have been migrated to these new
methods.
Additionally, `CURRENT_VERSION` has been renamed to `SOFTWARE_VERSION` in
`HDDSVersion` and `OzoneManagerVersion` to reflect the terminology used in the
new versioning system. For now `ClientVersion` continues to use
`CURRENT_VERSION` to refer to the latest version because clients are stateless
and will not have apparent versions. TBD if we standardize this terminology so
clients also refer to their latest version as `SOFTWARE_VERSION` in the future.
## What is the link to the Apache JIRA
HDDS-14735
## How was this patch tested?
TODO:
- [ ] Existing tests should pass since no functional change is expected.
- [ ] Unit tests for the new `isSupportedBy` methods added.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]