Skip to content

Conversation

felixbarny
Copy link
Member

A variation of #133631 that creates even smaller _tsids, fixed at 16 bytes.

The impact on index size is marginal but has the potential to speed up querying.

One tradeoff is that it's lightly more prone to collisions, as this is using 112 bits instead of 128 bits for the "uniqueness portion" of the tsid.

According to the Birthday attack simple approximation formula, it would take about 100 trillion time series to have a one in a million chance for a collision: $\sqrt{2^{1+112-20}}$.

While we need to account for the hash not being perfectly balanced, this should be safe.

However, we should test this also on non-OTel datasets.

@felixbarny felixbarny self-assigned this Aug 28, 2025
@elasticsearchmachine elasticsearchmachine added external-contributor Pull request authored by a developer outside the Elasticsearch team v9.2.0 labels Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-contributor Pull request authored by a developer outside the Elasticsearch team v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants