Skip to content

Conversation

@lhotari
Copy link
Member

@lhotari lhotari commented Nov 6, 2021

Motivation

Modifications

  • remove call to Thread.currentThread().interrupt()

- Thread.currentThread().interrupt() shouldn't be called here.
  - it must only be called when handling an InterruptedException.
  - this looks like a copy-paste bug introduced in
    https://github.com/apache/pulsar/pull/731/files#diff-d6fcf8aa2d0035cc386dca0942a452343d6854763c7fd397efa4e660c0069767R1183
@lhotari lhotari added type/bug The PR fixed a bug or issue reported a bug area/client doc-not-needed Your PR changes do not impact docs release/2.7.4 release/2.9.1 release/2.8.3 labels Nov 6, 2021
@lhotari lhotari added this to the 2.10.0 milestone Nov 6, 2021
@lhotari lhotari self-assigned this Nov 6, 2021
Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

That's definitely a bad place to Interupt the current Thread.

Good catch

@merlimat
Copy link
Contributor

merlimat commented Nov 6, 2021

That's definitely a bad place to Interupt the current Thread.

While it's wrong, it shouldn't be too bad :) . The interrupt will just flip the flag so that any blocking call can use that as a way to stop the wait.

@merlimat merlimat merged commit b5f78f8 into apache:master Nov 6, 2021
zeo1995 pushed a commit to zeo1995/pulsar that referenced this pull request Nov 7, 2021
* up/master: (55 commits)
  [broker] remove useless method "PersistentTopic#getPersistentTopic" (apache#12655)
  [Python Schema] Python schema support custom Avro configurations for Enum type (apache#12642)
  Allow to configure different implementations for Pulsar functions state store (apache#12646)
  Remove replicator global test from the quarantine group (apache#12648)
  [Java Client] Remove invalid call to Thread.currentThread().interrupt(); (apache#12652)
  k8s runtime: force deletion to avoid hung function worker during connector restart (apache#12504)
  [Broker] Optimize exception information for schemas (apache#12647)
  Close Zk database on unit tests (apache#12649)
  Fix call sync method in an async callback when enabling geo replicator. (apache#12590)
  [pulsar-broker] Add git branch information for PulsarVersion (apache#12541)
  PulsarAdmin: Fix last exit code storage (apache#12581)
  Add @test annotation to test methods (apache#12640)
  Upgrade debezium to 1.7.1 (apache#12644)
  [ML] Avoid passing OpAddEntry across a thread boundary in asyncAddEntry (apache#12606)
  [Functions] Prevent NPE while stopping a non started Pulsar LogAppender (apache#12643)
  Update io-debezium-source.md (apache#12638)
  Add missing cmds on pulsar-admin document page (apache#12634)
  Clean up the metadata of the non-persistent partitioned topics. (apache#12550)
  modify check waitingForPingResponse with volatile (apache#12615)
  [pulsar-admin] Check backlog quota policy for namespace (apache#12512)
  ...
zeo1995 pushed a commit to zeo1995/pulsar that referenced this pull request Nov 7, 2021
* up/master: (55 commits)
  [broker] remove useless method "PersistentTopic#getPersistentTopic" (apache#12655)
  [Python Schema] Python schema support custom Avro configurations for Enum type (apache#12642)
  Allow to configure different implementations for Pulsar functions state store (apache#12646)
  Remove replicator global test from the quarantine group (apache#12648)
  [Java Client] Remove invalid call to Thread.currentThread().interrupt(); (apache#12652)
  k8s runtime: force deletion to avoid hung function worker during connector restart (apache#12504)
  [Broker] Optimize exception information for schemas (apache#12647)
  Close Zk database on unit tests (apache#12649)
  Fix call sync method in an async callback when enabling geo replicator. (apache#12590)
  [pulsar-broker] Add git branch information for PulsarVersion (apache#12541)
  PulsarAdmin: Fix last exit code storage (apache#12581)
  Add @test annotation to test methods (apache#12640)
  Upgrade debezium to 1.7.1 (apache#12644)
  [ML] Avoid passing OpAddEntry across a thread boundary in asyncAddEntry (apache#12606)
  [Functions] Prevent NPE while stopping a non started Pulsar LogAppender (apache#12643)
  Update io-debezium-source.md (apache#12638)
  Add missing cmds on pulsar-admin document page (apache#12634)
  Clean up the metadata of the non-persistent partitioned topics. (apache#12550)
  modify check waitingForPingResponse with volatile (apache#12615)
  [pulsar-admin] Check backlog quota policy for namespace (apache#12512)
  ...
eolivelli pushed a commit that referenced this pull request Nov 9, 2021
…(); (#12652)

- Thread.currentThread().interrupt() shouldn't be called here.
  - it must only be called when handling an InterruptedException.
  - this looks like a copy-paste bug introduced in
    https://github.com/apache/pulsar/pull/731/files#diff-d6fcf8aa2d0035cc386dca0942a452343d6854763c7fd397efa4e660c0069767R1183

(cherry picked from commit b5f78f8)
@eolivelli eolivelli modified the milestones: 2.10.0, 2.9.0 Nov 9, 2021
codelipenghui pushed a commit that referenced this pull request Nov 18, 2021
…(); (#12652)

- Thread.currentThread().interrupt() shouldn't be called here.
  - it must only be called when handling an InterruptedException.
  - this looks like a copy-paste bug introduced in
    https://github.com/apache/pulsar/pull/731/files#diff-d6fcf8aa2d0035cc386dca0942a452343d6854763c7fd397efa4e660c0069767R1183

(cherry picked from commit b5f78f8)
@codelipenghui codelipenghui added release/2.8.2 cherry-picked/branch-2.8 Archived: 2.8 is end of life and removed release/2.8.3 labels Nov 18, 2021
eolivelli pushed a commit to eolivelli/pulsar that referenced this pull request Nov 29, 2021
…(); (apache#12652)

- Thread.currentThread().interrupt() shouldn't be called here.
  - it must only be called when handling an InterruptedException.
  - this looks like a copy-paste bug introduced in
    https://github.com/apache/pulsar/pull/731/files#diff-d6fcf8aa2d0035cc386dca0942a452343d6854763c7fd397efa4e660c0069767R1183
michaeljmarshall pushed a commit to datastax/pulsar that referenced this pull request Dec 8, 2021
…(); (apache#12652)

- Thread.currentThread().interrupt() shouldn't be called here.
  - it must only be called when handling an InterruptedException.
  - this looks like a copy-paste bug introduced in
    https://github.com/apache/pulsar/pull/731/files#diff-d6fcf8aa2d0035cc386dca0942a452343d6854763c7fd397efa4e660c0069767R1183

(cherry picked from commit b5f78f8)
codelipenghui pushed a commit that referenced this pull request Dec 11, 2021
…(); (#12652)

- Thread.currentThread().interrupt() shouldn't be called here.
  - it must only be called when handling an InterruptedException.
  - this looks like a copy-paste bug introduced in
    https://github.com/apache/pulsar/pull/731/files#diff-d6fcf8aa2d0035cc386dca0942a452343d6854763c7fd397efa4e660c0069767R1183

(cherry picked from commit b5f78f8)
@codelipenghui codelipenghui added the cherry-picked/branch-2.7 Archived: 2.7 is end of life label Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/client cherry-picked/branch-2.7 Archived: 2.7 is end of life cherry-picked/branch-2.8 Archived: 2.8 is end of life doc-not-needed Your PR changes do not impact docs release/2.7.4 release/2.8.2 type/bug The PR fixed a bug or issue reported a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants