You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "siddhantsangwan (via GitHub)" <gi...@apache.org> on 2023/02/08 09:51:05 UTC

[GitHub] [ozone] siddhantsangwan opened a new pull request, #4259: Hdds 7915

siddhantsangwan opened a new pull request, #4259:
URL: https://github.com/apache/ozone/pull/4259

   ## What changes were proposed in this pull request?
   
   LegacyReplicationManager#closeReplicasIfPossible tries to close replicas. 
   
   ```
     private int closeReplicasIfPossible(ContainerInfo container,
                                         List<ContainerReplica> replicas) {
       // This method should not be used on open containers.
       if (container.getState() == LifeCycleState.OPEN) {
         return 0;
       }
   
       int numCloseCmdsSent = 0;
       Iterator<ContainerReplica> iterator = replicas.iterator();
       while (iterator.hasNext()) {
         final ContainerReplica replica = iterator.next();
         final State state = replica.getState();
         if (state == State.OPEN || state == State.CLOSING) {
           sendCloseCommand(container, replica.getDatanodeDetails(), false);
           numCloseCmdsSent++;
           iterator.remove();
         } else if (state == State.QUASI_CLOSED) {
           // Send force close command if the BCSID matches
           if (container.getSequenceId() == replica.getSequenceId()) {
             sendCloseCommand(container, replica.getDatanodeDetails(), true);
             numCloseCmdsSent++;
             iterator.remove();
           }
         }
       }
   
       return numCloseCmdsSent;
     }
   ```
   
   In one case, this method is called from LegacyReplicationManager#handleUnderReplicatedUnhealthy, where the replica's state matches the container state. If the state is QUASI_CLOSED, we will end up closing the replica and eventually the container, even though the replica doesn't have all the data. This should not happen and is what this jira is meant to fix. Force closing a QUASI_CLOSED replica of a QUASI_CLOSED container is handled separately earlier in the processContainer method.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-7915
   
   ## How was this patch tested?
   
   Added UT


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] errose28 merged pull request #4259: HDDS-7915. Force close QUASI_CLOSED replicas only when the container is CLOSED in Legacy RM

Posted by "errose28 (via GitHub)" <gi...@apache.org>.
errose28 merged PR #4259:
URL: https://github.com/apache/ozone/pull/4259


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] siddhantsangwan commented on pull request #4259: HDDS-7915. Force close QUASI_CLOSED replicas only when the container is CLOSED in Legacy RM

Posted by "siddhantsangwan (via GitHub)" <gi...@apache.org>.
siddhantsangwan commented on PR #4259:
URL: https://github.com/apache/ozone/pull/4259#issuecomment-1423745695

   > btw in the description I think you mean it is called from LegacyReplicationManager#handleUnderReplicatedHealthy since there are quasi closed replicas of a quasi closed container.
   
   Yup! Thanks for reviewing.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org