yandrey321 commented on code in PR #10365:
URL: https://github.com/apache/ozone/pull/10365#discussion_r3305707903


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java:
##########
@@ -589,7 +609,9 @@ private CompletableFuture<Message> writeStateMachineData(
     Preconditions.checkArgument(!write.getData().isEmpty());
     try {
       if (server.getDivision(getGroupId()).getInfo().isLeader()) {
-        stateMachineDataCache.put(entryIndex, write.getData());
+        // Cache the full proto bytes so read() can return them for slow 
followers
+        // without having to reconstruct the proto from raw bytes.
+        stateMachineDataCache.put(entryIndex, requestProto.toByteString());

Review Comment:
   how cache would be cleaned in case if write to disk fails?
   
   How long data would be stored in cache and how it would be evicted over the 
time?



-- 
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]

Reply via email to