bharatviswa504 commented on a change in pull request #2704:
URL: https://github.com/apache/ozone/pull/2704#discussion_r721742179
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
##########
@@ -735,17 +737,20 @@ public void notifyTermIndexUpdated(long term, long index)
{
@Override
public CompletableFuture<Message> applyTransaction(TransactionContext trx) {
long index = trx.getLogEntry().getIndex();
- // Since leader and one of the followers has written the data, it can
- // be removed from the stateMachineDataMap.
- stateMachineDataCache.remove(index);
-
- DispatcherContext.Builder builder =
- new DispatcherContext.Builder()
- .setTerm(trx.getLogEntry().getTerm())
- .setLogIndex(index);
-
- long applyTxnStartTime = Time.monotonicNowNanos();
+ // once both the followers catch up, remove the entry from the cache.
+ // if the Resource limit cache is full, leader will push back new requests
+ // and waits for a slow follower to catch up.
Review comment:
Do you mean here pendingRequests will be full in RatisServer, and we
shall fail with ResourceUnavailableException ??
If so, can we make it little clear, if not provide info for my understanding
:)
--
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]