Skip to content

Conversation

@colings86
Copy link
Contributor

Changes the serialisation of pre and post offset to use Long instead of VLong so that negative values are supported. This actually only showed up in the case where minDocCount=0 as the rounding is only serialised in this case.

Closes #7312

Copy link
Contributor

Choose a reason for hiding this comment

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

The problem here is that it would break multi-version clusters. We still need to read/write vLong depending on in/out.getVersion so that at least positive offsets work.

@jpountz
Copy link
Contributor

jpountz commented Aug 18, 2014

I was first afraid this bug might have been introduced by #6980 but it seems that it is not the case, right?

Just left a comment about backward compatibility of the stream. Otherwise it looks good.

@jpountz jpountz removed the review label Aug 18, 2014
@colings86
Copy link
Contributor Author

Yep, I think it was present before I made that change and refactored the class.

Have updated the serialisation to solve the backwards compatibility issue

@jpountz
Copy link
Contributor

jpountz commented Aug 19, 2014

I think we shouldn't change the serialization format in a minor release, so I would rather fix it in 1.4.0 only? Otherwise LGTM.

@jpountz jpountz removed the review label Aug 19, 2014
@colings86 colings86 self-assigned this Aug 19, 2014
Copy link
Contributor

Choose a reason for hiding this comment

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

It think this is problematic since this forces LocalTransport all the time even if we run with network tests. I think you should add a setting to AssertingLocalTransport that allows you to set the min version? then you can just pass the min version here instead of the TransportModule.TRANSPORT_TYPE_KEY I hope that makes sense

@s1monw
Copy link
Contributor

s1monw commented Aug 21, 2014

LGTM thanks for all the iterations!

Changes the serialisation of pre and post offset to use Long instead of VLong so that negative values are supported.  This actually only showed up in the case where minDocCount=0 as the rounding is only serialised in this case.

Closes #7312
@colings86 colings86 merged commit 8550b9e into elastic:master Aug 21, 2014
@colings86 colings86 assigned colings86 and unassigned colings86 Aug 21, 2014
@colings86 colings86 deleted the fix/7312 branch August 21, 2014 15:09
@jpountz jpountz removed the review label Aug 26, 2014
@clintongormley clintongormley changed the title Aggregations: Fixes pre and post offset serialisation for histogram aggs Fixes pre and post offset serialisation for histogram aggs Jun 7, 2015
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.

Aggregations: DateHistogram with negative 'pre_offset' or 'post_offset' value ends with "Message not fully read (response) for"

4 participants