You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2018-07-15 23:05:01 [ DLM-/pigeon40namespace-OrderedScheduler-1-0:8345 ] - [ ERROR ] Unexpected throwable caught org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:38)
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1437)
at java.util.HashMap$ValueIterator.next(HashMap.java:1466)
at org.apache.distributedlog.impl.ZKLogSegmentMetadataStore.lambda$notifyLogSegmentsUpdated$1(ZKLogSegmentMetadataStore.java:493)
at org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:745)
and then no more data is read.
BP
This is the master ticket for tracking BP-<bp-number> :
[a short description for this BP]
Proposal PR - #<pr-number>
The text was updated successfully, but these errors were encountered:
…r.readNext(true)
*Motivation*
Fixesapache#1544. ConcurrentModificationException is thrown when trying to access a non-thread-safe hashmap from different threads.
*Changes*
Make sure accessing to this non-thread-safe hashmap is under synchronized block.
*Tests*
It is a bit tricky to reproduce this race condition in a unit test or an integration test. so not going to attempt adding any tests.
@sijie Now I switch to blocking read and then everything is fine. I want to prevent blocking for a long time, I call lastShardTxId = dlm.getLastTxId(); when I reeach the lastShardTxId, I will sleep for a while 100ms and then call dlm.getLastTxId(); to check if there 's new log entry to read.
…logReader.readNext(true)
Descriptions of the changes in this PR:
*Motivation*
Fixes#1544. ConcurrentModificationException is thrown when trying to access a non-thread-safe hashmap from different threads.
*Changes*
Make sure accessing to this non-thread-safe hashmap is under synchronized block.
*Tests*
It is a bit tricky to reproduce this race condition in a unit test or an integration test. so not going to attempt adding any tests.
Master Issue: #1544
Author: Sijie Guo <sijie@apache.org>
Reviewers: Enrico Olivelli <eolivelli@gmail.com>, Jia Zhai <None>
This closes#1558 from sijie/issue_1544, closes#1544
(cherry picked from commit ec7fb62)
Signed-off-by: Sijie Guo <sijie@apache.org>
BUG REPORT
I do a nonblocking read from the server with three bookie, my version is bookkeeper 4.7.1
my code is
and I observe an error log
and then no more data is read.
BP
This is the master ticket for tracking BP-<bp-number> :
[a short description for this BP]
Proposal PR - #<pr-number>
The text was updated successfully, but these errors were encountered: