-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Decrease size of _tsids created by TsidBuilder #133631
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
base: main
Are you sure you want to change the base?
Conversation
Based on testing, this has marginal impact on storage but decreases the size of the _tsids from 21B-36B to 18B-21B.
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
server/src/test/java/org/elasticsearch/cluster/routing/TsidBuilderTests.java
Outdated
Show resolved
Hide resolved
@@ -209,11 +214,11 @@ public MurmurHash3.Hash128 hash() { | |||
* The TSID is a hash that includes: | |||
* <ul> | |||
* <li> | |||
* A hash of the dimension field names (4 bytes). | |||
* A hash of the dimension field names (1 byte). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if we skip this? is it worth experimenting with? It'd be nice to have a tsid that's always the same size e.g. 20b.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Storage is a little worse, but not much. We may be overfitting to a specific dataset, though. We could also have a fixed 4 bytes instead of a variable 1-4 bytes for the values similarity hash.
Based on testing, this has marginal impact on storage but decreases the size of the _tsids from 21B-36B to 18B-21B.
Follow-up from #133344
Part of #132566