GlenGeng commented on a change in pull request #1981:
URL: https://github.com/apache/ozone/pull/1981#discussion_r588841020



##########
File path: 
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/block/TestDeletedBlockLog.java
##########
@@ -85,23 +86,24 @@
   private ContainerManagerV2 containerManager;
   private StorageContainerManager scm;
   private List<DatanodeDetails> dnList;
-  private DBTransactionBuffer dbTransactionBuffer;
+  private SCMHADBTransactionBuffer SCMHADBTransactionBuffer;
 
   @Before
   public void setup() throws Exception {
     testDir = GenericTestUtils.getTestDir(
         TestDeletedBlockLog.class.getSimpleName());
     conf = new OzoneConfiguration();
+    conf.setBoolean(ScmConfigKeys.OZONE_SCM_HA_ENABLE_KEY, true);
     conf.setInt(OZONE_SCM_BLOCK_DELETION_MAX_RETRY, 20);
     conf.set(HddsConfigKeys.OZONE_METADATA_DIRS, testDir.getAbsolutePath());
     scm = TestUtils.getScm(conf);
     containerManager = Mockito.mock(ContainerManagerV2.class);
-    dbTransactionBuffer =
-        new MockDBTransactionBuffer(scm.getScmMetadataStore().getStore());
+    SCMHADBTransactionBuffer =
+        new MockSCMHADBTransactionBuffer(scm.getScmMetadataStore().getStore());

Review comment:
       One tricky thing is that, recon uses `MockSCMHAManager` and 
`MockSCMHADBTransactionBuffer`, and recon needs actually a in-memory SCM.
   Since Recon will not use ratis, `flush` is not called, thus there will 
finally be OOM for recon.
   
   ```
   Ctor of ReconStorageContainerManagerFacade
       this.scmhaManager = MockSCMHAManager.getInstance(
           true, new MockSCMHADBTransactionBuffer(dbStore));
   
   ```




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

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