-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
refactor: change some hashbrown
RawTable
uses to HashTable
(round 2)
#13524
base: main
Are you sure you want to change the base?
Conversation
@@ -216,18 +216,18 @@ impl GroupValues for GroupValuesRows { | |||
} | |||
std::mem::swap(&mut new_group_values, &mut group_values); | |||
|
|||
// SAFETY: self.map outlives iterator and is not modified concurrently |
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.
Picking this one, but this pattern occurs multiple times:
That SAFETY
statement is just plain wrong: while iterating over the map, we erase elements from it. That is THE prime example for "concurrent modification of containers" and why Rust's lifetimes/reference system prevents that. I'm kinda surprised that this hasn't exploded yet.
The test failure (full logs here):
Is the order of |
It isn't / shouldn't be AFAIK |
Test was fixed in #13547 |
Changes look good, can we run some benchmark. |
Which issue does this PR close?
For #13433, but only parts of it.
Rationale for this change
Prepare
hashbrown
0.15 upgrade.What changes are included in this PR?
HashTableAllocExt
Are these changes tested?
Existing tests pass.
Are there any user-facing changes?
No.