szetszwo commented on code in PR #5288:
URL: https://github.com/apache/ozone/pull/5288#discussion_r1521970022
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerProtocolServerSideTranslatorPB.java:
##########
@@ -243,6 +243,10 @@ private OMResponse submitRequestToRatis(OMRequest request)
private OMResponse submitReadRequestToOM(OMRequest request)
throws ServiceException {
+ // Read from leader or followers using linearizable read
+ if (omRatisServer.isLinearizableRead()) {
+ return handler.handleReadRequest(request);
+ }
Review Comment:
> ... OzoneManagerRequestHandler#handleReadRequest queries the OM metadata
tables directly without going through Ratis (OzoneManagerStateMachine#query).
...
This is a good point! Adding the code here seems incorrect.
> ... does OM provides a "read-after-write" consistency (or is it stronger?)
even through the read does not go through Ratis server?
For the same client, since the calls are blocking, it will have
"read-after-write" consistency (An earlier write must be done before processing
the later read.)
> ... If we enable linearizable read we can increase the consistency
guarantee to "linearizable"?
Yes.
It also guarantee read-after-write consistent even for the Ratis async APIs.
--
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]