You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2024/09/20 15:55:25 UTC
[I] Remove reliance on java gc cleaners in NativeMap code [accumulo]
keith-turner opened a new issue, #4911:
URL: https://github.com/apache/accumulo/issues/4911
**Describe the bug**
The NativeMap code creates iterators over the native map that have a java component and a native component. The native component has a small amount of native memory allocated that the java code references and frees. AFAICT freeing these native iterators is handled in the code by Java GC cleaners, this needs to be double checked. These iterators can be created really frequently creating a lot of small work for the Java GC cleaners. This does not seem like a good practice and it is unclear what the impact on Java GC is by making it do all of this work. It is likely that the impact can change depending on java gc settings, so it is not good for predictability.
**Expected behavior**
The Native map code makes a best effort attempt to always free the native iterator memory for normal operations and only relies on the java gc cleaners for exceptional edge cases.
The following native map code is involved in this.
NativeMap.NMIterator
NativeMap.ConcurrentIterator
NativeMap.createNMI
NativeMap.deleteNMI
These native map iterators are used by scans and minor compactions which have well defined life cycles. Hopefully can refactor the code to free native memory when the iterator is no longer used.
--
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: notifications-unsubscribe@accumulo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org