Github user weijietong commented on a diff in the pull request:
https://github.com/apache/drill/pull/925#discussion_r137953813
--- Diff:
exec/rpc/src/main/java/org/apache/drill/exec/rpc/RequestIdMap.java ---
@@ -54,10 +52,14 @@ void channelClosed(Throwable ex) {
isOpen.set(false);
if (ex != null) {
final RpcException e = RpcException.mapException(ex);
+ IntObjectHashMap<RpcOutcome<?>> clonedMap;
synchronized (map) {
- map.forEach(new SetExceptionProcedure(e));
+ clonedMap = map.clone();
map.clear();
}
+ if (clonedMap != null) {
--- End diff --
@paul-rogers clonedMap will not be null from the current code logic ,just
for conservative safe. If it seems redundancy ,I will remove the null check.
---