hudi icon indicating copy to clipboard operation
hudi copied to clipboard

[MINOR] Avoid resource leaks

Open the-other-tim-brown opened this issue 1 year ago • 3 comments
trafficstars

Change Logs

This PR aims to track down more places there may be leaks in our tests while also cleaning up a couple of spots that were easier to track down.

  • Added logs to shutdown hooks to see when they are called since they are a crutch and indicate we are missing some calls to close in the application itself
  • Close some hadoop readers in tests
  • Remove shutdown hook on metrics class if shutdown is already called from the application.

Impact

Make it easier to identify leaks, clean up some test code

Risk level (write none, low medium or high below)

None

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the ticket number here and follow the instruction to make changes to the website.

Contributor's checklist

  • [ ] Read through contributor's guide
  • [ ] Change Logs and Impact were stated clearly
  • [ ] Adequate tests were added if applicable
  • [ ] CI passed

the-other-tim-brown avatar Dec 17 '23 15:12 the-other-tim-brown

Can this issue be fixed and merged into the 0.14.1 branch as soon as possible? @nsivabalan @danny0405 @the-other-tim-brown

zyclove avatar Dec 26 '23 06:12 zyclove

Can this issue be fixed and merged into the 0.14.1 branch as soon as possible? @nsivabalan @danny0405 @the-other-tim-brown

It is up to the project committers. I've re-triggered tests if that is what they are waiting on.

the-other-tim-brown avatar Dec 28 '23 03:12 the-other-tim-brown

CI report:

  • 76fac0f35c10d1b563229e8807491445f58fa675 Azure: SUCCESS
Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

hudi-bot avatar Jan 03 '24 08:01 hudi-bot