You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by we...@apache.org on 2026/02/26 21:49:30 UTC

(ozone) branch master updated: HDDS-14719. Opened checkpoint RocksDB for txn info verification in read-only mode to prevent unnecessary compaction. (#9827)

This is an automated email from the ASF dual-hosted git repository.

weichiu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new e7a02e4c18c HDDS-14719. Opened checkpoint RocksDB for txn info verification in read-only mode to prevent unnecessary compaction. (#9827)
e7a02e4c18c is described below

commit e7a02e4c18c6c209f433967ae6d747661ecde8bd
Author: SaketaChalamchala <sa...@gmail.com>
AuthorDate: Thu Feb 26 13:49:24 2026 -0800

    HDDS-14719. Opened checkpoint RocksDB for txn info verification in read-only mode to prevent unnecessary compaction. (#9827)
    
    Co-authored-by: Copilot <17...@users.noreply.github.com>
---
 .../src/main/java/org/apache/hadoop/hdds/utils/HAUtils.java        | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HAUtils.java b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HAUtils.java
index 1fce92a111d..844978c44f6 100644
--- a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HAUtils.java
+++ b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HAUtils.java
@@ -259,7 +259,12 @@ private static TransactionInfo getTransactionInfoFromDB(
       DBDefinition definition)
       throws IOException {
 
-    try (DBStore dbStore = DBStoreBuilder.newBuilder(tempConfig, definition, dbName, dbDir).build()) {
+    try (DBStore dbStore = DBStoreBuilder
+        .newBuilder(tempConfig, definition, dbName, dbDir)
+        .setOpenReadOnly(true)
+        .setCreateCheckpointDirs(false)
+        .setEnableRocksDbMetrics(false)
+        .build()) {
       // Get the table name with TransactionInfo as the value. The transaction
       // info table name are different in SCM and SCM.
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org