Skip to content

Commit 05c8fcb

Browse files
jbachorikclaude
andcommitted
fix(chaos): interrupt recycler before join; deadline-based consumer join; fix spec typo
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 41d9e25 commit 05c8fcb

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

ddprof-stresstest/src/chaos/java/com/datadoghq/profiler/chaos/BoundedThreadPoolAntagonist.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public void start() {
6060
@Override
6161
public void stopGracefully(Duration timeout) {
6262
running = false;
63+
recycler.interrupt();
6364
try {
6465
recycler.join(timeout.toMillis());
6566
} catch (InterruptedException e) {

ddprof-stresstest/src/chaos/java/com/datadoghq/profiler/chaos/ConsumerGroupAntagonist.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public void start() {
5656
@Override
5757
public void stopGracefully(Duration timeout) {
5858
running = false;
59+
long deadline = System.currentTimeMillis() + timeout.toMillis();
5960
rebalancer.interrupt();
6061
try {
6162
rebalancer.join(timeout.toMillis() / 2);
@@ -65,7 +66,9 @@ public void stopGracefully(Duration timeout) {
6566
for (Thread t : consumers) {
6667
if (t != null) {
6768
t.interrupt();
68-
try { t.join(500L); } catch (InterruptedException e) {
69+
long remaining = Math.max(0L, deadline - System.currentTimeMillis());
70+
if (remaining == 0L) break;
71+
try { t.join(remaining); } catch (InterruptedException e) {
6972
Thread.currentThread().interrupt();
7073
}
7174
}

docs/sphinx/specs/2026-05-29-generate-hidden-classes-in-the-lookup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# generate-hidden-classes-in-the-lookup-packag
1+
# generate-hidden-classes-in-the-lookup-package
22

33
## Finding
44

0 commit comments

Comments
 (0)