Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/23763 )
Change subject: IMPALA-14605: Fix memory leak in global admissiond for cancelled queued queries ...................................................................... IMPALA-14605: Fix memory leak in global admissiond for cancelled queued queries This patch fixes a memory leak where dequeued queries being cancelled due to the admission service backpressure errors, and the admission_state_map_ hasn't cleared the coresponding admission state entry. Since the removal could be unsafe due to lock inversion risks between the admission service and admission controller locks. The change introduces: 1. Async Cleanup: A background thread in AdmissionControlService to safely remove map entries without holding conflicting locks. 2. AdmissionController does cleanup via a callback function admission_map_cleanup_cb_ registered by AdmissiondEnv. 3. Added INBOUND_GETQUERYSTATUS_REJECT debug action to simulate backpressure and force cancellations during queuing. Tests: Added regression test test_admission_state_map_leak_in_dequeue. Change-Id: I7f16f3cf986e2038d6486d3ec687135d561e2cbf Reviewed-on: http://gerrit.cloudera.org:8080/23763 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M be/src/rpc/impala-service-pool.cc M be/src/scheduling/admission-control-service.cc M be/src/scheduling/admission-control-service.h M be/src/scheduling/admission-controller.cc M be/src/scheduling/admission-controller.h M be/src/scheduling/admissiond-env.cc M tests/custom_cluster/test_admission_controller.py 7 files changed, 147 insertions(+), 0 deletions(-) Approvals: Impala Public Jenkins: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/23763 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I7f16f3cf986e2038d6486d3ec687135d561e2cbf Gerrit-Change-Number: 23763 Gerrit-PatchSet: 9 Gerrit-Owner: Yida Wu <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jason Fehr <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Reviewer: Yida Wu <[email protected]>
