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