Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HSEARCH-2240 Query of the wrong type being generated during parallel … #1078

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
2 participants
@Sanne
Copy link
Member

commented Apr 23, 2016

@Sanne

This comment has been minimized.

Copy link
Member Author

commented Apr 25, 2016

Marked urgent as I can't essentially test reliably any other PR until this is merged

@gunnarmorling

This comment has been minimized.

Copy link
Member

commented Apr 25, 2016

Looks ok, but could you explain how this relates to the issue described in 2240? It's not quite clear how repeated service loading causes this error. Thx!

@Sanne

This comment has been minimized.

Copy link
Member Author

commented Apr 25, 2016

Running elasticsearch queries in parallel would attempt to lookup the Query Translator service in parallel.

Parallel service lookups would attempt to iterate on the ORM's ClassloaderService, which doesn't enumerate service implementors in a threadsafe way.

The result is that "some" threads would fail to find the translator service implementation, fall back to "null", which is then handled by the query execution code as a "no need for translation" and it eventually attempts to run the Lucene query - eventually it fails to run the Lucene query on the ES IndexManager.

Seems like an old bug, specifically in the ORM ClassLoader wrapper, although all consumers of it normally wouldn't lookup a service at runtime: using the service lookup sequentially at bootstrap as we normally do doesn't trigger the issue.

@gunnarmorling

This comment has been minimized.

Copy link
Member

commented Apr 25, 2016

Holy moly! Did you open a HHH bug for it?

In that light, the patch looks like a good improvement, though it ultimately seems to need fixing in ORM. Can you merge it yourself?

@Sanne

This comment has been minimized.

Copy link
Member Author

commented Apr 25, 2016

Holy moly! Did you open a HHH bug for it?

Not yet, was wondering what you'd think of it. Clearly HHH's service management is not designed to be threadsafe - somehow we assumed it would from a Search perspective.

With this fix, it's not going to bother us anymore.

I'll open one so we can see if the ORM teams wants to fix it or add some comment/warning.

Can you merge it yourself?

sure, thanks

@Sanne Sanne closed this Apr 25, 2016

@Sanne Sanne deleted the Sanne:HSEARCH-2240 branch Apr 25, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.