Sailesh Mukil has uploaded a new change for review. http://gerrit.cloudera.org:8080/7436
Change subject: IMPALA-5667: Race in DataStremSender could cause TransmitData sidecar corruption ...................................................................... IMPALA-5667: Race in DataStremSender could cause TransmitData sidecar corruption This is caused by a race in the DataStreamSender where if a query is cancelled while 2 TransmitData RPCs for HASH_PARTITIONED exchanges are in progress, a third TransmitData RPC may overwrite the sidecar pointed to by the first RPC while the first RPC is in progress. This could also happen if the DataStreamSender instance has somehow asynchronously been closed, or if a previous RPC has returned with a DATASTREAM_RECVR_ALREADY_GONE error. The entire sequence of events is listed in the JIRA and explained more clearly there as it's a long and complicated explanation. The fix is basically to return a cancelled status if the DSS realizes that the query is being cancelled. We previously returned an OK status since some higher level execution node would take care of propogating this cancelled status to the rest of the execution tree. This doesn't work well for TransmitData to HASH_PARTITIONED exchanges since we don't check for cancellation until we've consumed the entire RowBatch input to the DSS. In that time, we could potentially have multiple RPCs attempting to serialize the outbound protobuf sidecars only to later realize that the query has been cancelled and throw them away. Change-Id: I7742551236205c49393a7351291eae6aefb4fa09 --- M be/src/runtime/data-stream-sender.cc 1 file changed, 8 insertions(+), 4 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/36/7436/1 -- To view, visit http://gerrit.cloudera.org:8080/7436 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7742551236205c49393a7351291eae6aefb4fa09 Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Sailesh Mukil <[email protected]>
