Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-9421

AsyncIndexUpdate failure may report misleading restart time

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • core
    • None

    Description

      in runWhenPermitted:

              if (isLeaseCheckEnabled(leaseTimeOut)) {
                  // check for concurrent updates
                  long leaseEndTime = async.getLong(leasify(name));
                  long currentTime = System.currentTimeMillis();
                  if (leaseEndTime > currentTime) {
                      long leaseExpMsg = (leaseEndTime - currentTime) / 1000;
                      String err = String.format("Another copy of the index update is already running; skipping this update. " +
                              "Time left for lease to expire %d s. Indexing can resume by %tT", leaseExpMsg, leaseEndTime);
                      indexStats.failed(new Exception(err, newConcurrentUpdateException()));
                      return;
                  }
              }
      

      When then lease time is set to a high value, the end time might be on the next day; so the message should include the day.

      Attachments

        Activity

          People

            Unassigned Unassigned
            reschke Julian Reschke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: