rpuch commented on code in PR #7638:
URL: https://github.com/apache/ignite-3/pull/7638#discussion_r2840277725
##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/storage/impl/VolatileLogStorageManagerCreator.java:
##########
@@ -183,16 +208,34 @@ public CompletableFuture<Void> stopAsync(ComponentContext
componentContext) {
ExecutorServiceHelper.shutdownAndAwaitTermination(executorService);
try {
- closeAll(columnFamily, db, dbOptions);
+ closeRocksResources();
} catch (Exception e) {
return failedFuture(e);
}
return nullCompletedFuture();
}
+ private void closeRocksResources() {
+ // This class obtains a default env which is not necessary to be
closed, but the closure call is tolerated.
+ // But future subclasses might override how they create env, so we
still close it explicitly.
+ closeAll(columnFamily, db, dbOptions, cfOption, sstFileManager, env);
+ }
+
@Override
public LogStorageManager manager(LogStorageBudgetView budgetView) {
return new VolatileLogStorageManager(budgetView, db, columnFamily,
executorService);
}
+
+ @TestOnly
+ RocksDB db() {
+ return db;
+ }
+
+ /**
+ * Returns total number of bytes occupied on disk by the log storages
managed by this object.
+ */
+ public long totalBytesOnDisk() {
Review Comment:
It will be used by production code, this will happen in next PR
--
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]