swamirishi commented on code in PR #9131:
URL: https://github.com/apache/ozone/pull/9131#discussion_r2482012266
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/TestOMDbCheckpointServletInodeBasedXfer.java:
##########
@@ -228,12 +236,21 @@ public void write(int b) throws IOException {
.thenReturn(lock);
doCallRealMethod().when(omDbCheckpointServletMock).getCheckpoint(any(),
anyBoolean());
assertNull(doCallRealMethod().when(omDbCheckpointServletMock).getBootstrapTempData());
- doCallRealMethod().when(omDbCheckpointServletMock).getSnapshotDirs(any());
doCallRealMethod().when(omDbCheckpointServletMock).
processMetadataSnapshotRequest(any(), any(), anyBoolean(),
anyBoolean());
doCallRealMethod().when(omDbCheckpointServletMock).writeDbDataToStream(any(),
any(), any(), any());
doCallRealMethod().when(omDbCheckpointServletMock).getCompactionLogDir();
doCallRealMethod().when(omDbCheckpointServletMock).getSstBackupDir();
+ doCallRealMethod().when(omDbCheckpointServletMock)
+ .transferSnapshotData(anySet(), any(), anySet(), any(), any(),
anyMap());
+
doCallRealMethod().when(omDbCheckpointServletMock).createAndPrepareCheckpoint(anyBoolean());
+
doCallRealMethod().when(omDbCheckpointServletMock).getSnapshotDirsFromDB(any());
+ if (useNoOpBootstrapLock) {
+ // Override the lock to be a no-op so purgeSnapshot can work inside the
callback
+ BootstrapStateHandler.Lock noOpLock = new DBCheckpointServlet.Lock();
+ when(omDbCheckpointServletMock.getBootstrapStateLock())
Review Comment:
We don't need a noop lock. We should pause the double buffer thread and
delete the snapshot just before acquiring the lock.
--
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]