Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-6298

Use timestamp of PENDING_DISABLE_COUNT to calculate elapse time for PENDING_DISABLE state

Agile BoardAttach filesAttach ScreenshotVotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.0, 4.15.0
    • Fix Version/s: 5.1.0, 4.16.0
    • Component/s: None
    • Labels:
      None

      Description

      Instead of taking indexDisableTimestamp to calculate the elapsed time, we should be considering the last time we incr/decremented the counter for PENDING_DISABLE_COUNT. as if the application writes failures span more than the default threshold of 30 seconds, the index will unnecessarily get disabled even though the client could have retried and made it active.

                          long elapsedSinceDisable = EnvironmentEdgeManager.currentTimeMillis() - Math.abs(indexDisableTimestamp);
      
      // on an index write failure, the server side transitions to PENDING_DISABLE, then the client
                          // retries, and after retries are exhausted, disables the index
                          if (indexState == PIndexState.PENDING_DISABLE) {
                              if (elapsedSinceDisable > pendingDisableThreshold) {
                                  // too long in PENDING_DISABLE - client didn't disable the index, so we do it here
                                  IndexUtil.updateIndexState(conn, indexTableFullName, PIndexState.DISABLE, indexDisableTimestamp);
                              }
                              continue;
                          }
      

        Attachments

          Activity

            People

            • Assignee:
              vjasani Viraj Jasani
              Reporter:
              ankit@apache.org Ankit Singhal

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment