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

Remove query-cache serialization optimization. #9500

Closed

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Jan 30, 2015

The query-cache has an optimization to not deserialize the bytes at the shard
level. However this is a bit fragile since it assumes that serialized streams
can be concatenated (which is not the case with shared strings) and also does
not update the QueryResult object that is held by the SearchContext. So you
need to make sure to use the right one.

With this change, the query cache just deserializes bytes into the QueryResult
object from the context.

Closes #9294

The query-cache has an optimization to not deserialize the bytes at the shard
level. However this is a bit fragile since it assumes that serialized streams
can be concatenanted (which is not the case with shared strings) and also does
not update the QueryResult object that is held by the SearchContext. So you
need to make sure to use the right one.

With this change, the query cache just deserializes bytes into the QueryResult
object from the context.
@s1monw
Copy link
Contributor

s1monw commented Jan 30, 2015

LGTM

@jpountz jpountz added >bug and removed review labels Jan 30, 2015
@jpountz
Copy link
Contributor Author

jpountz commented Jan 30, 2015

For the record, you had to be quite unlucky to hit this bug since it only occurs with shared strings, which only seem to be used when using non-default time zones with date aggregations.

@s1monw
Copy link
Contributor

s1monw commented Jan 30, 2015

For the record, you had to be quite unlucky to hit this bug since it only occurs with shared strings, which only seem to be used when using non-default time zones with date aggregations.

LOL awesome now I know why I hit it first :)

jpountz added a commit that referenced this pull request Jan 30, 2015
The query-cache has an optimization to not deserialize the bytes at the shard
level. However this is a bit fragile since it assumes that serialized streams
can be concatenanted (which is not the case with shared strings) and also does
not update the QueryResult object that is held by the SearchContext. So you
need to make sure to use the right one.

With this change, the query cache just deserializes bytes into the QueryResult
object from the context.

Close #9500
jpountz added a commit that referenced this pull request Jan 30, 2015
The query-cache has an optimization to not deserialize the bytes at the shard
level. However this is a bit fragile since it assumes that serialized streams
can be concatenanted (which is not the case with shared strings) and also does
not update the QueryResult object that is held by the SearchContext. So you
need to make sure to use the right one.

With this change, the query cache just deserializes bytes into the QueryResult
object from the context.

Close #9500
@jpountz jpountz closed this in 00d54fa Jan 30, 2015
@clintongormley clintongormley changed the title Search: Remove query-cache serialization optimization. Query cache: Remove query-cache serialization optimization. Feb 11, 2015
@clintongormley clintongormley added the :Search/Search Search-related issues that do not fall into other categories label Mar 19, 2015
@clintongormley clintongormley added :Cache and removed :Search/Search Search-related issues that do not fall into other categories labels Jun 8, 2015
@clintongormley clintongormley changed the title Query cache: Remove query-cache serialization optimization. Remove query-cache serialization optimization. Jun 8, 2015
mute pushed a commit to mute/elasticsearch that referenced this pull request Jul 29, 2015
The query-cache has an optimization to not deserialize the bytes at the shard
level. However this is a bit fragile since it assumes that serialized streams
can be concatenanted (which is not the case with shared strings) and also does
not update the QueryResult object that is held by the SearchContext. So you
need to make sure to use the right one.

With this change, the query cache just deserializes bytes into the QueryResult
object from the context.

Close elastic#9500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to deserialize response when using Top Hits aggregation with search_type "count"
3 participants