swamirishi commented on code in PR #8589:
URL: https://github.com/apache/ozone/pull/8589#discussion_r2221761102


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/metadata/WitnessedContainerMetadataStoreImpl.java:
##########
@@ -67,13 +74,53 @@ private 
WitnessedContainerMetadataStoreImpl(ConfigurationSource config, boolean
   @Override
   protected DBStore initDBStore(DBStoreBuilder dbStoreBuilder, 
ManagedDBOptions options, ConfigurationSource config)
       throws RocksDatabaseException, CodecException {
+    previousVersionTables = new PreviousVersionTables();
+    previousVersionTables.addTables(dbStoreBuilder);
     final DBStore dbStore = dbStoreBuilder.build();
-    this.containerIdsTable = 
this.getDbDef().getContainerIdsTable().getTable(dbStore);
+    previousVersionTables.init(dbStore);
+    this.containerCreateInfoTable = 
this.getDbDef().getContainerCreateInfoTableDef().getTable(dbStore);
     return dbStore;
   }
 
   @Override
-  public Table<ContainerID, String> getContainerIdsTable() {
-    return containerIdsTable;
+  public Table<ContainerID, ContainerCreateInfo> getContainerCreateInfoTable() 
{
+    if 
(!VersionedDatanodeFeatures.isFinalized(HDDSLayoutFeature.WITNESSED_CONTAINER_DB_PROTO_VALUE))
 {

Review Comment:
   We could have this Wrapped object present as member in the class itself. So 
on finalize all we need to update is a boolean value for the present in the 
wrapped table.



-- 
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]

Reply via email to