mailtoboggavarapu-coder commented on PR #19742:
URL: https://github.com/apache/hudi/pull/19742#issuecomment-5419712042

   Pinging for committer approval. This PR fixes an `AmazonDynamoDBLockClient` 
resource leak in `DynamoDBBasedLockProviderBase.close()` — if `releaseLock()` 
throws, `client.close()` is skipped entirely. This is particularly severe 
because the client is constructed with 
`withCreateHeartbeatBackgroundThread(true)`, meaning a background heartbeat 
thread keeps running indefinitely if `close()` is never called, consuming 
threads and AWS DynamoDB API quota.
   
   The fix moves `client.close()` into a `finally` block so it is always called 
regardless of whether lock release succeeds or throws. Single structural 
change, no logic change.
   
   [@danny0405](https://github.com/danny0405) 
[@yihua](https://github.com/yihua) 
[@vinothchandrasekar](https://github.com/vinothchandrasekar) 
[@nsivabalan](https://github.com/nsivabalan) — would appreciate a review and 
merge when you get a chance. Thank you!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to