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

fix histogram aggregator cache key #1534

Merged
merged 1 commit into from
Jul 16, 2015

Conversation

xvrl
Copy link
Member

@xvrl xvrl commented Jul 16, 2015

No description provided.

@fjy
Copy link
Contributor

fjy commented Jul 16, 2015

👍

.allocate(1 + fieldNameBytes.length + Floats.BYTES * breaks.length)
.put(CACHE_TYPE_ID)
.put(fieldNameBytes)
.put((byte)0);
Copy link
Contributor

Choose a reason for hiding this comment

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

why 0?

Copy link
Member Author

Choose a reason for hiding this comment

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

to make sure there is a separator, otherwise it is possible to have fieldNames / breaks combinations that cause cache key collisions.

Copy link
Contributor

Choose a reason for hiding this comment

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

We solved that in another cache key with invalid UTF-8 byte sequences I think. Can we do that here also?

drcrallen added a commit that referenced this pull request Jul 16, 2015
@drcrallen drcrallen merged commit 4b1bd29 into apache:master Jul 16, 2015
@drcrallen drcrallen deleted the fix-histogram-cachekey branch July 16, 2015 01:32
@fjy fjy added this to the 0.8.1 milestone Jul 17, 2015
seoeun25 pushed a commit to seoeun25/incubator-druid that referenced this pull request Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants