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

IndexDisabler should not use NodeBuilder#isReplaced

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.7.11, 1.8.0
    • indexing
    • None

    Description

      IndexDisabler currently uses NodeBuilder#isReplaced method to check if "disableIndexesOnNextCycle" is set in current flow or not. This is used to ensure that disabling is not done in same cycle as the one where reindexing was done.

              //Skip disabling for the cycle where reindexing just got completed
              if (idxBuilder.isReplaced(DISABLE_INDEXES_ON_NEXT_CYCLE)){
                  return emptyList();
              }
      

      This method though has issues as it would return true

      • If property is only modified. If property is added then it returns false
      • Even if the property is not added new it may return true if base state is different object. This happens to be case with SegmentNodeStore and not with others

      As a fix we should check explicitly with base state instead of using this api

      Attachments

        Issue Links

          Activity

            People

              chetanm Chetan Mehrotra
              chetanm Chetan Mehrotra
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: