ChenSammi commented on code in PR #3691:
URL: https://github.com/apache/ozone/pull/3691#discussion_r1122583131
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/DeletedBlockLogImpl.java:
##########
@@ -126,18 +128,27 @@ public DeletedBlockLogImpl(ConfigurationSource conf,
}
@Override
- public List<DeletedBlocksTransaction> getFailedTransactions()
+ public List<DeletedBlocksTransaction> getFailedTransactions(int count)
throws IOException {
lock.lock();
try {
final List<DeletedBlocksTransaction> failedTXs = Lists.newArrayList();
try (TableIterator<Long,
? extends Table.KeyValue<Long, DeletedBlocksTransaction>> iter =
deletedBlockLogStateManager.getReadOnlyIterator()) {
- while (iter.hasNext()) {
- DeletedBlocksTransaction delTX = iter.next().getValue();
- if (delTX.getCount() == -1) {
- failedTXs.add(delTX);
+ if (count <= 0) {
Review Comment:
We should use LIST_ALL_FAILED_TRANSACTIONS check here.
--
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]