Skip to content

OAK-12125: gracefully handle property index missing propertyNames (#2924)#2926

Open
thomasmueller wants to merge 1 commit into
trunkfrom
OAK-12125
Open

OAK-12125: gracefully handle property index missing propertyNames (#2924)#2926
thomasmueller wants to merge 1 commit into
trunkfrom
OAK-12125

Conversation

@thomasmueller
Copy link
Copy Markdown
Member

A missing 'propertyNames' caused an NPE that escaped IndexUpdate's IllegalStateException catch and broke the async indexing cycle. Add an opt-in fallback gated by FT_GRANITE-63829 (registered in @activate, driven by LaunchDarkly in production): when on, the editor logs one WARN per misconfigured index path and uses a sentinel property name so the cycle continues. Default off preserves the pre-PR behavior.

)

A missing 'propertyNames' caused an NPE that escaped IndexUpdate's
IllegalStateException catch and broke the async indexing cycle. Add an
opt-in fallback gated by FT_GRANITE-63829 (registered in @activate, driven
by LaunchDarkly in production): when on, the editor logs one WARN per
misconfigured index path and uses a sentinel property name so the cycle
continues. Default off preserves the pre-PR behavior.

Co-authored-by: Theia Vlad <tvlad@Theias-MacBook-Pro.local>
@Activate
private void activate(BundleContext bundleContext) {
Whiteboard whiteboard = new OsgiWhiteboard(bundleContext);
this.feature = newFeature(FT_GRANITE_63829, whiteboard);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Toggle name?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen a similar naming scheme used in other parts of the codebase and went along with it. Thanks for the catch, I'll revise it.

}

private EditorHook hookWithFeatureEnabled(boolean enabled) {
PropertyIndexEditorProvider provider = new PropertyIndexEditorProvider();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently this works but why is the name of the toggle not needed here? (just asking)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provider class doesn't get the toggle from the constructor (only the editor does). It has the toggle name hardcoded in the activate method, where only the osgiContext is needed, for the creating the whiteboard with the shared state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants