-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-6723. Close Rocks objects properly in OzoneManager #3400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
om_stdout.log |
|
The changes here are in the right direction but this will need to be updated post merge of #3426 |
9681dcf to
9c10897
Compare
Change-Id: Ie63955c03bc2202a352e3e74d8eafe3fdf74fae1 Conflicts: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileRequest.java Change-Id: I7306e6f224a7ab466cd5b3222d949bd6531ba324
Change-Id: I7bbd272ed5c7ed2fd1328a4189404de9116c699a
Change-Id: Ie4f2aab3f6531da2cb093f8e8086afc483072d1f
adoroszlai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jojochuang for working on this.
I found a few more unclosed table iterators in KeyManagerImpl:
ozone/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
Lines 1553 to 1554 in a89da04
| TableIterator<String, ? extends Table.KeyValue<String, OmKeyInfo>> | |
| iterator; |
ozone/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
Lines 2010 to 2011 in a89da04
| TableIterator<String, ? extends Table.KeyValue<String, OmDirectoryInfo>> | |
| iterator = dirTable.iterator(); |
ozone/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java
Lines 2397 to 2398 in a89da04
| TableIterator<String, ? extends Table.KeyValue<String, OmDirectoryInfo>> | |
| iterator = dirTable.iterator(); |
Change-Id: I6088fc7aa1e967d6d59e3ef1c6a697c1d0ae5b39
Change-Id: I99fb164c9e2137db6f52cdcd556a9919222a0252
Change-Id: I0d2a5bf89d56faafaa7948fbeb98db768ab1ada8
Change-Id: I4e477d9ad8eeeda6ecf71f610eb657f394740cfd
adoroszlai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jojochuang for updating the patch.
|
@kerneltime would you like to take another look? |
|
Thanks @jojochuang for the patch, @kerneltime for the review. |
* master: (46 commits) HDDS-6901. Configure HDDS volume reserved as percentage of the volume space. (apache#3532) HDDS-6978. EC: Cleanup RECOVERING container on DN restarts (apache#3585) HDDS-6982. EC: Attempt to cleanup the RECOVERING container when reconstruction failed at coordinator. (apache#3583) HDDS-6968. Addendum: [Multi-Tenant] Fix USER_MISMATCH error even on correct user. (apache#3578) HDDS-6794. EC: Analyze and add putBlock even on non writing node in the case of partial single stripe. (apache#3514) HDDS-6900. Propagate TimeoutException for all SCM HA Ratis calls. (apache#3564) HDDS-6938. handle NPE when removing prefixAcl (apache#3568) HDDS-6960. EC: Implement the Over-replication Handler (apache#3572) HDDS-6979. Remove unused plexus dependency declaration (apache#3579) HDDS-6957. EC: ReplicationManager - priortise under replicated containers (apache#3574) HDDS-6723. Close Rocks objects properly in OzoneManager (apache#3400) HDDS-6942. Ozone Buckets/Objects created via S3 should not allow group access (apache#3553) HDDS-6965. Increase timeout for basic check (apache#3563) HDDS-6969. Add link to compose directory in smoketest README (apache#3567) HDDS-6970. EC: Ensure DatanodeAdminMonitor can handle EC containers during decommission (apache#3573) HDDS-6977. EC: Remove references to ContainerReplicaPendingOps in TestECContainerReplicaCount (apache#3575) HDDS-6217. Cleanup XceiverClientGrpc TODOs, and document how the client works and should be used. (apache#3012) HDDS-6773. Cleanup TestRDBTableStore (apache#3434) - fix checkstyle HDDS-6773. Cleanup TestRDBTableStore (apache#3434) HDDS-6676. KeyValueContainerData#getProtoBufMessage() should set block count (apache#3371) ... Conflicts: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/upgrade/SCMUpgradeFinalizer.java
Change-Id: I5e2f906508d92c1c21555aa51d9b5c97744f26cd
(cherry picked from commit c1cda1d8e99555282b991f174d0bf597c0deb950)
What changes were proposed in this pull request?
Close RocksDB objects when they are not used.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6723
How was this patch tested?
This is tested in an internal branch, ran a few workloads.
The RocksDB jar was replaced with a custom build which prints memory leak in stdout. This is the code: https://github.com/jojochuang/rocksdb/commits/debug_memory_leak
With this change, most of the leaks are now gone, except during OM initialization when load DB. Didn't care much about them as they account for very little memory usage.