swamirishi commented on code in PR #8818:
URL: https://github.com/apache/ozone/pull/8818#discussion_r2213808947
##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/TransactionInfoRepair.java:
##########
@@ -65,12 +68,16 @@ public class TransactionInfoRepair extends RepairTool {
@Override
public void execute() throws Exception {
+ ManagedConfigOptions configOptions = new ManagedConfigOptions();
+ ManagedDBOptions dbOptions = new ManagedDBOptions();
List<ColumnFamilyHandle> cfHandleList = new ArrayList<>();
- List<ColumnFamilyDescriptor> cfDescList =
RocksDBUtils.getColumnFamilyDescriptors(
- dbPath);
+ List<ColumnFamilyDescriptor> cfDescList = new ArrayList<>();
String columnFamilyName = getColumnFamily(serviceToBeOffline()).getName();
- try (ManagedRocksDB db = ManagedRocksDB.open(dbPath, cfDescList,
cfHandleList)) {
+ // Preserve all the previous DB options
+ OptionsUtil.loadLatestOptions(configOptions, dbPath, dbOptions,
cfDescList);
Review Comment:
Why cant we use the DBStoreBuilder class for this instead of opening rocksdb
by itself. From what I understand it would automatically set the required
options from there, provided we run this tool with the same configuration.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]