ivanzlenko commented on code in PR #7638:
URL: https://github.com/apache/ignite-3/pull/7638#discussion_r2839395870
##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/storage/logit/LogitLogStorageManager.java:
##########
@@ -127,6 +131,19 @@ public LogSyncer logSyncer() {
return new NoOpLogSyncer();
}
+ @Override
+ public long totalBytesOnDisk() {
+ // The implementation is ineffeicient, but it's here just for
completeness. Logit is not production ready and will never become
Review Comment:
Let's create a task to remove Logit implementation then.
##########
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:
Not sure if this needs to be public, since its used only in tests. I
would've make it package-private and add TestOnly annotation.
--
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]