carp84 commented on a change in pull request #10416: [FLINK-14484] Enable to
control memory usage of RocksDB via Cache and WriteBufferManager
URL: https://github.com/apache/flink/pull/10416#discussion_r353782366
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java
##########
@@ -81,6 +84,12 @@
/** Reserved memory per memory owner. */
private final Map<Object, Map<MemoryType, Long>> reservedMemory;
+ /** Reserved closeable shared objects for state backends fetched from
this memory manager. */
+ private final AtomicReference<Deque<AutoCloseable>>
stateBackendSharedObjects;
Review comment:
I suggest to introduce a `RocksDBSharedObject` wrapping up `Cache` and
`WriteBufferManager` objects to attach here to simplify the logic. Please refer
to [this review
branch](https://github.com/carp84/flink/tree/flink-14484-review) for detailed
idea.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services