Skip to content

[improve][cli] Make pulsar-perf termination more responsive by using Thread interrupt status - #24309

Merged
liangyepianzhou merged 10 commits into
apache:masterfrom
lhotari:lh-improve-pulsar-testclient-interruption
May 16, 2025
Merged

liangyepianzhou merged 10 commits into
apache:masterfrom
lhotari:lh-improve-pulsar-testclient-interruption

Conversation

@lhotari

@lhotari lhotari commented May 15, 2025

Copy link
Copy Markdown
Member

Motivation

Terminating pulsar-perf with CTRL-C could take a while. There's also a similar problem in some test cases that I came across while fixing test resource leaks.

Modifications

  • replace while(true) loops with while(!Thread.currentThread().isInterrupted())
  • properly propagate Thread interrupted information after catching exceptions
  • fix issue in tests related to runtime hook resource leaks
    • when the execution completes successfully, remove the shutdown hook and run it without waiting for JVM exit

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

…ed())"

(cherry picked from commit e9daeed8233cefff4b810f060fa7fe01ef7b302a)
@lhotari lhotari added this to the 4.1.0 milestone May 15, 2025
@lhotari lhotari self-assigned this May 15, 2025
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label May 15, 2025
lhotari added a commit that referenced this pull request May 16, 2025
…Thread interrupt status (#24309)

### Motivation

Terminating pulsar-perf with CTRL-C could take a while. There's also a similar problem in some test cases that I came across while fixing test resource leaks.

### Modifications

- replace `while(true)` loops with `while(!Thread.currentThread().isInterrupted())`
- properly propagate Thread interrupted information after catching exceptions
- fix issue in tests related to runtime hook resource leaks
  - when the execution completes successfully, remove the shutdown hook and run it without waiting for JVM exit

(cherry picked from commit 99ad0e0)
lhotari added a commit that referenced this pull request May 16, 2025
…Thread interrupt status (#24309)

### Motivation

Terminating pulsar-perf with CTRL-C could take a while. There's also a similar problem in some test cases that I came across while fixing test resource leaks.

### Modifications

- replace `while(true)` loops with `while(!Thread.currentThread().isInterrupted())`
- properly propagate Thread interrupted information after catching exceptions
- fix issue in tests related to runtime hook resource leaks
  - when the execution completes successfully, remove the shutdown hook and run it without waiting for JVM exit

(cherry picked from commit 99ad0e0)
manas-ctds pushed a commit to datastax/pulsar that referenced this pull request May 28, 2025
…Thread interrupt status (apache#24309)

### Motivation

Terminating pulsar-perf with CTRL-C could take a while. There's also a similar problem in some test cases that I came across while fixing test resource leaks.

### Modifications

- replace `while(true)` loops with `while(!Thread.currentThread().isInterrupted())`
- properly propagate Thread interrupted information after catching exceptions
- fix issue in tests related to runtime hook resource leaks
  - when the execution completes successfully, remove the shutdown hook and run it without waiting for JVM exit

(cherry picked from commit 99ad0e0)
(cherry picked from commit e3ed8fc)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Jun 2, 2025
…Thread interrupt status (apache#24309)

### Motivation

Terminating pulsar-perf with CTRL-C could take a while. There's also a similar problem in some test cases that I came across while fixing test resource leaks.

### Modifications

- replace `while(true)` loops with `while(!Thread.currentThread().isInterrupted())`
- properly propagate Thread interrupted information after catching exceptions
- fix issue in tests related to runtime hook resource leaks
  - when the execution completes successfully, remove the shutdown hook and run it without waiting for JVM exit

(cherry picked from commit 99ad0e0)
(cherry picked from commit e3ed8fc)
KannarFr pushed a commit to CleverCloud/pulsar that referenced this pull request Sep 22, 2025
…Thread interrupt status (apache#24309)

### Motivation

Terminating pulsar-perf with CTRL-C could take a while. There's also a similar problem in some test cases that I came across while fixing test resource leaks.

### Modifications

- replace `while(true)` loops with `while(!Thread.currentThread().isInterrupted())` 
- properly propagate Thread interrupted information after catching exceptions
- fix issue in tests related to runtime hook resource leaks
  - when the execution completes successfully, remove the shutdown hook and run it without waiting for JVM exit
walkinggo pushed a commit to walkinggo/pulsar that referenced this pull request Oct 8, 2025
…Thread interrupt status (apache#24309)

### Motivation

Terminating pulsar-perf with CTRL-C could take a while. There's also a similar problem in some test cases that I came across while fixing test resource leaks.

### Modifications

- replace `while(true)` loops with `while(!Thread.currentThread().isInterrupted())` 
- properly propagate Thread interrupted information after catching exceptions
- fix issue in tests related to runtime hook resource leaks
  - when the execution completes successfully, remove the shutdown hook and run it without waiting for JVM exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants