-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDDS-11989. Enable SCM Ratis in tests related to DeletedBlockLog #7615
Conversation
7c866d4
to
962b562
Compare
b98b169
to
9237309
Compare
/** | ||
* Flush deleted block log & wait till something was flushed. | ||
*/ | ||
public static void waitForDeletedBlockLog(StorageContainerManager scm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of scope of this PR but I guess this test https://github.com/apache/ozone/blob/master/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestStorageContainerManager.java#L324-L334
can be rewritten using the new utility method here.
Can be done as part of HDDS-11867
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR makes sense. Is it ready for review?
Thanks @jojochuang for the review. Marked it as ready for review. |
return false; | ||
} | ||
}, 1000, 22000); | ||
OzoneTestUtils.waitBlockDeleted(cluster.getStorageContainerManager()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm this isn't an exact replacement because OzoneTestUtils.waitBlockDeleted() doesn't flush SCMHADBTransactionBuffer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This place is for waiting blocks to be deleted. The test flush SCMHADBTransactionBuffer while creating delete transaction log. See
Lines 989 to 997 in dcbc136
private void addTransactions(StorageContainerManager scm, | |
DeletedBlockLog delLog, | |
Map<Long, List<Long>> containerBlocksMap) | |
throws IOException, TimeoutException { | |
delLog.addTransactions(containerBlocksMap); | |
if (SCMHAUtils.isSCMHAEnabled(scm.getConfiguration())) { | |
scm.getScmHAManager().asSCMHADBTransactionBuffer().flush(); | |
} | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok
.../org/apache/hadoop/ozone/container/common/statemachine/commandhandler/TestBlockDeletion.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/OzoneTestUtils.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Thanks @chungen0126 |
What changes were proposed in this pull request?
Tests related to DeletedBlockLog needs to be tweaked to work with SCM Ratis enabled:
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-11989
How was this patch tested?
CI:
https://github.com/chungen0126/ozone/actions/runs/12570960386