thomasmueller commented on code in PR #2938:
URL: https://github.com/apache/jackrabbit-oak/pull/2938#discussion_r3378819738
##########
oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/editor/FulltextIndexEditor.java:
##########
@@ -158,6 +164,19 @@ public void leave(NodeState before, NodeState after)
}
}
+ if (wasIndexable && !isIndexable()) {
Review Comment:
I _think_ there might be some edge case where a node was changed (first
triggering an update), _and_ at the same time the mixin was changed so it is
deleted. I don't know if there is a test case for this, and if this would fail.
To cover this case, I think it would be better to use a "staged" logic:
toBeAdded = ... || ... || ... || ...
toBeDeleted = ... || ... || ... || ...
toBeUpdated = ... || ... || ... || ...
if (toBeDeleted) {
// delete logic
} else if (toBeAdded) {
// add logic
} else if (toBeUpdated) {
// update logic
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]