Skip to content

Make sure to hold the entry lock while resetting#724

Merged
jeltz merged 1 commit into
percona:mainfrom
jeltz:reset-locking
Jul 6, 2026
Merged

Make sure to hold the entry lock while resetting#724
jeltz merged 1 commit into
percona:mainfrom
jeltz:reset-locking

Conversation

@jeltz

@jeltz jeltz commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

When we switch buckets we believe we may have to reset hash table entries. if that is actually the case is a bit unclear since we also have code which tries to delete all old entries when switching bucket, but we may at least clean up the code so we do not modify entries in shared memory without holding a lock.

While at it we also move the taking and releasing of spin locks to a more sensible location.

PG-0

@jeltz jeltz force-pushed the reset-locking branch 2 times, most recently from 7b74e73 to 287aadc Compare June 19, 2026 20:52
@jeltz jeltz marked this pull request as draft June 19, 2026 20:56
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.31%. Comparing base (86edb37) to head (3566c2f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #724      +/-   ##
==========================================
- Coverage   88.33%   88.31%   -0.03%     
==========================================
  Files           3        3              
  Lines        1329     1326       -3     
  Branches      201      198       -3     
==========================================
- Hits         1174     1171       -3     
  Misses         72       72              
  Partials       83       83              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jeltz jeltz marked this pull request as ready for review June 30, 2026 14:21
Comment thread src/pg_stat_monitor.c Outdated
@jeltz jeltz force-pushed the reset-locking branch 2 times, most recently from a2fd92e to 22cc4fd Compare July 3, 2026 08:08
@jeltz jeltz requested a review from dutow July 3, 2026 15:08
When we switch buckets we believe we may have to reset hash table
entries. if that is actually the case is a bit unclear since we also
have code which tries to delete all old entries when switching bucket,
but we may at least clean up the code so we do not modify entries in
shared memory without holding a lock.

While at it we also move the taking and releasing of spin locks to a
more sensible location.
Comment thread src/pg_stat_monitor.c
@jeltz jeltz merged commit 019256d into percona:main Jul 6, 2026
28 checks passed
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.

3 participants