bharatviswa504 commented on a change in pull request #2704:
URL: https://github.com/apache/ozone/pull/2704#discussion_r721738159
##########
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:
If Resource limit cache is full, we shall be blocked in acquire(int ..
permits)
resources.get(i).acquire(permits[i]); right?
Not understood how leader what is meant by push back new requests?
Can you provide little more info for my clarity?
--
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]