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

Load percolator queries before shard is marked POST_RECOVERY #11799

Merged
merged 1 commit into from Jun 22, 2015

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented Jun 22, 2015

If we mark the shard as being in POST_RECOVERY before the percolator
is fully set up we might expose it to the user as fully searchable before
all queries are loaded. This can lead to wrong results especially in tests
when a shard is concurrently marked as STARTED.

This commit also removes unneeded abstractions on IndexShard where readoperations
should be allowed when the purpose is a write.

Closes #10722

@s1monw s1monw added >bug v2.0.0-beta1 review :Search/Percolator Reverse search: find queries that match a document labels Jun 22, 2015
@s1monw
Copy link
Contributor Author

s1monw commented Jun 22, 2015

her is a failure related to this http://build-us-00.elastic.co/job/es_core_master_centos/5330/

}


private void readAllowed(boolean writeOperation) throws IllegalIndexShardStateException {
Copy link
Member

Choose a reason for hiding this comment

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

++ to this simplification

@bleskes
Copy link
Contributor

bleskes commented Jun 22, 2015

Looks good - left one comment.

@martijnvg
Copy link
Member

LGTM

@bleskes
Copy link
Contributor

bleskes commented Jun 22, 2015

LGTM 2

If we mark the shard as being in POST_RECOVERY before the percolator
is fully set up we might expose it to the user as fully searchable before
all queries are loaded. This can lead to wrong results especially in tests
when a shard is concurrently marked as STARTED.

This commit also removes unneded abstractions on IndexShard where readoperations
should be allowed when the purose is a write.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Percolator Reverse search: find queries that match a document v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants