Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

fix deadlock #182

Merged
merged 1 commit into from
Sep 23, 2020
Merged

fix deadlock #182

merged 1 commit into from
Sep 23, 2020

Conversation

aloyszhang
Copy link
Contributor

fix #181
This pull request fix the deadlock in kop.

@jiazhai
Copy link
Contributor

jiazhai commented Sep 23, 2020

@aloyszhang Thanks for the work.
ci failed at mvn spotbugs:check

[ERROR] io.streamnative.pulsar.handlers.kop.utils.timer.TimerTask.getTimerTaskEntry() is unsynchronized, io.streamnative.pulsar.handlers.kop.utils.timer.TimerTask.setTimerTaskEntry(TimerTaskList$TimerTaskEntry) is synchronized [io.streamnative.pulsar.handlers.kop.utils.timer.TimerTask] At TimerTask.java:[line 50] UG_SYNC_SET_UNSYNC_GET

@aloyszhang
Copy link
Contributor Author

aloyszhang commented Sep 23, 2020

@jiazhai
It's caused by we remove synchronized only from TimerTask#getTimerTaskEntry but Spotbug check synchronized for both getter and setter.
Now fixed by moving synchronized from TimerTask#setTimerTaskEntry to inside method and replace with synchronized (this)
But CI stilled failed for ThreadTimeoutException in KafkaIntegrationTest, can you help on this problem?

@jiazhai jiazhai merged commit 29ffcff into streamnative:master Sep 23, 2020
@aloyszhang aloyszhang deleted the deadlock-fix branch January 21, 2021 01:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] deadlock in kop
3 participants