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

Fixes pre and post offset serialisation for histogram aggs #7313

Merged
merged 1 commit into from Aug 21, 2014
Merged

Fixes pre and post offset serialisation for histogram aggs #7313

merged 1 commit into from Aug 21, 2014

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

out.writeVLong(preOffset);
out.writeVLong(postOffset);
out.writeLong(preOffset);
out.writeLong(postOffset);
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
}

@Override
protected Settings nodeSettings(int nodeOrdinal) {
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
4 participants