Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-9960

OM State machine lastIndexUpdate consume memory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None

    Description

      update lastTransactionIndex is also done from another flow,

      ratis --> notifyTermIndexUpdated(). --> computeAndUpdateLastAppliedIndex() -->  else part (for flow from ratis)

      } else {
        if (getLastAppliedTermIndex().getIndex() + 1 == lastFlushedIndex) {
          updateLastAppliedTermIndex(currentTerm, lastFlushedIndex);
          if (LOG.isDebugEnabled()) {
            LOG.debug("ComputeAndUpdateLastAppliedIndex due to notifyIndex {}",
                getLastAppliedTermIndex());
          }
        } else {
          ratisTransactionMap.put(lastFlushedIndex, currentTerm); 

      If lastTransactionAppliedIndex and ratis transaction index difference is only "1", it update the last transaction index. This can cause db flush transaction to be behind the ratis transaction. So replay of those tranasaction will not happen in case of OM crash at this point.

       

      So there is a two different behavior exist, that when to update lastAppliedTransaction, creating confusion about expectation for this perspective.

       

      Also its observed updating last applied transaction stuck when there is difference in transaction index due to exception. This was causing ratisTransactionMap holding large number of transaction and not applied. https://issues.apache.org/jira/browse/HDDS-9342.

       

      Attachments

        Issue Links

          Activity

            People

              sumitagrawl Sumit Agrawal
              sumitagrawl Sumit Agrawal
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: