Skip to content

[ISSUE #68] Wake segment waiters when a drained refill finishes - #69

Merged
mxsm merged 2 commits into
developfrom
mxsm/fix-13-segment-wakeup
Nov 28, 2026
Merged

mxsm merged 2 commits into
developfrom
mxsm/fix-13-segment-wakeup

Conversation

@mxsm

@mxsm mxsm commented Nov 28, 2026

Copy link
Copy Markdown
Owner

Closes #68

Step 13. Signal stock changes and successful completion under the switching lock. A caller waiting after the last delivered segment was drained can request the next refill within its original deadline. An empty or failed delivery does not create a busy retry loop.

Validation

A deterministic two-generation in-memory regression drained the only segment before releasing its provider, observed exactly one refill owner, and returned unique IDs 1 and 2 without timing out. Core, SDK and benchmark reactor passed. Re-ran the formerly failing 8-thread refill JMH on JDK 25: two forks, 2 x 1 s warmup and 3 x 2 s measurements each, GC profiler, 256–512 MiB heap. All six measured samples completed (2.570/2.393/2.389 and 2.354/2.293/1.927 million ops/s); no benchmark exceptions.

@mxsm
mxsm merged commit 8289a31 into develop Nov 28, 2026
1 check 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.

[Plan 13] Wake segment waiters when a drained refill finishes

1 participant