-
Notifications
You must be signed in to change notification settings - Fork 10
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
[PROF-11405] Fix managed string storage causing corrupt profiles #896
Merged
ivoanjo
merged 5 commits into
main
from
ivoanjo/prof-11405-fix-managed-string-table-cache-invalidation
Mar 3, 2025
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e17fd15
Add failing test for managed string storage cache invalidation
ivoanjo 0271347
[PROF-11405] Fix managed string storage causing corrupt profiles
ivoanjo 9469f89
Merge branch 'main' into ivoanjo/prof-11405-fix-managed-string-table-…
ivoanjo 4ee0c0b
Minor: Use `context` for cleaner error handling
ivoanjo 32b350f
Merge branch 'main' into ivoanjo/prof-11405-fix-managed-string-table-…
ivoanjo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Do we want to use an incrementing number? If there are two profiles we switch between, would we get conflicts on this id?
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.
This is on purpose: The idea is that a single
ManagedStringStorage
is intended to "outlive" profiles, as it gets reused. Thus, because id generation is centralized in theManagedStringStorage
, all of these many profiles, across resets and whatnot, will get a unique number.E.g. there is no way (that I can see) for the same id to be generated, and the rest of the changes to the profile/the type try really hard to make ids not be reused.
Having said that, there's one thing we don't check: that a given
CachedProfileId
does not get used with the wrongManagedStringTable
. E.g. get the id from table1, then use it with table2.This is not possible with the current profile code -- and kinda goes against how the managed string table is intended to be used (e.g. 1 managed string table to N profiles, not > 1 managed string table to 1 profile) so I'm not sure it's worth making the code that much more complex to try to prevent it.