This repository was archived by the owner on Sep 30, 2024. It is now read-only.
insights: change series_id to string (hash); add index #18230
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Today,
series_idwill need to be some unique identifier of the actual series definition in the user/org/global settings, e.g. there are two unique series here:The plan was to have
series_ideffectively be a hash of the source of settings (user ID / org ID / global) + the actual info associated with the insight series. However, an int32 is likely not sufficient for this due to collisions. I considered using crc64 with an int64 data type, but there is still some uncomfortable room for collisions there and text is cheap - so let's just store text for now and use a sha256 hash to err on the side of caution.