Reindexing is skipped when a contained entity change follows a change that is irrelevant to indexing

Description

We have this code in PojoIndexedTypeIndexingPlan:

The if condition is presumably only there for performance, but:

  1. I doubt it improves performance by a lot, since getState( identifier ).updateBecauseOfContained( entitySupplier ); doesn't do much when the state already exists.

  2. I believe it's wrong. If we create a state for some benign change (such as an update to a property that is not indexed), and then end up in this method because a contained entity has changed, then we will skip reindexing.

We should:

  1. Add a test for this.

  2. Remove the if to fix the problem.

  3. Maybe, in a follow-up ticket, prevent the creation of a state for updates that are not relevant to indexing?

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Sprint

Priority

Created January 18, 2021 at 2:02 PM
Updated February 8, 2021 at 4:44 PM
Resolved January 19, 2021 at 11:12 AM