Skip to content

Fix missing increment of deleted_entries #13933

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wks
Copy link
Contributor

@wks wks commented Jul 17, 2025

When rb_concurrent_set_foreach_with_replace deletes entries from a concurrent set, it should increment the deleted_entries field, too.

When rb_concurrent_set_find_or_insert successfully deletes an entry that points to a garbage object, we should increment deleted_entries, too. We must increment atomcially because another thread may be deleting another entry concurrently. For this, we change deleted_entries to rb_atomic_t.

When `rb_concurrent_set_foreach_with_replace` deletes entries from a
concurrent set, it should increment the `deleted_entries` field, too.

When `rb_concurrent_set_find_or_insert` successfully deletes an entry
that points to a garbage object, we should increment `deleted_entries`,
too.  We must increment atomcially because another thread may be
deleting another entry concurrently.  For this, we change
`deleted_entries` to `rb_atomic_t`.
Copy link

Tests Failed

✖️no tests failed ✔️62107 tests passed(1 flake)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant