duongkame commented on code in PR #5376:
URL: https://github.com/apache/ozone/pull/5376#discussion_r1344556949
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java:
##########
@@ -314,7 +313,11 @@ public TransactionContext
preAppendTransaction(TransactionContext trx)
@Override
public CompletableFuture<Message> applyTransaction(TransactionContext trx) {
try {
- OMRequest request = OMRatisHelper.convertByteStringToOMRequest(
+ // For the Leader, the OMRequest is set in trx in startTransaction.
+ // For Followers, the OMRequest hast to be converted from the log entry.
+ final Object context = trx.getStateMachineContext();
+ final OMRequest request = context != null ? (OMRequest) context
Review Comment:
So, the followers need to deserialize. That's OK if `applyTransaction` on
the followers does not slow the commit phase down. Is that the case?
I think `applyTransaction` is done after the majority commit, just wanna
double check.
--
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]