mirror of https://github.com/apache/druid.git
Revert adding synchronized to swapRequest method as the caller method onWaitEnd(), is only invoked in synchronized code blocks. There is no need to repeat sync it even if java's synchronized keyword holds a reentrant mutex semantic ^_^.
This commit is contained in:
parent
03cdf3a8fe
commit
0b627dde71
|
@ -355,7 +355,7 @@ public class RocketMQFirehoseFactory implements FirehoseFactory<ByteBufferInputR
|
|||
}
|
||||
}
|
||||
|
||||
private synchronized void swapRequests() {
|
||||
private void swapRequests() {
|
||||
List<DruidPullRequest> tmp = requestsWrite;
|
||||
requestsWrite = requestsRead;
|
||||
requestsRead = tmp;
|
||||
|
@ -438,7 +438,9 @@ public class RocketMQFirehoseFactory implements FirehoseFactory<ByteBufferInputR
|
|||
LOGGER.error("", e);
|
||||
}
|
||||
|
||||
swapRequests();
|
||||
synchronized (this) {
|
||||
swapRequests();
|
||||
}
|
||||
|
||||
doPull();
|
||||
LOGGER.info(getServiceName() + " terminated.");
|
||||
|
|
Loading…
Reference in New Issue