priyeshkaratha commented on code in PR #9272:
URL: https://github.com/apache/ozone/pull/9272#discussion_r2533735051
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/SCMDeletedBlockTransactionStatusManager.java:
##########
@@ -709,14 +692,12 @@ private void initDataDistributionData() throws
IOException {
if
(VersionedDatanodeFeatures.isFinalized(HDDSLayoutFeature.STORAGE_SPACE_DISTRIBUTION))
{
DeletedBlocksTransactionSummary summary = loadDeletedBlocksSummary();
if (summary != null) {
- isFirstTxIdForDataDistributionSet = true;
- firstTxIdForDataDistribution = summary.getFirstTxID();
totalTxCount.set(summary.getTotalTransactionCount());
totalBlockCount.set(summary.getTotalBlockCount());
totalBlocksSize.set(summary.getTotalBlockSize());
totalReplicatedBlocksSize.set(summary.getTotalBlockReplicatedSize());
- LOG.info("Data distribution is enabled with totalBlockCount {}
totalBlocksSize {} lastTxIdBeforeUpgrade {}",
- totalBlockCount.get(), totalBlocksSize.get(),
firstTxIdForDataDistribution);
+ LOG.info("Data distribution is enabled with totalBlockCount {}
totalBlocksSize",
Review Comment:
Resolved.
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/SCMDeletedBlockTransactionStatusManager.java:
##########
@@ -489,20 +481,13 @@ public void removeTransactions(ArrayList<Long> txIDs)
throws IOException {
!disableDataDistributionForTest) {
ArrayList<Long> txToQueryList = new ArrayList<>();
for (Long txID: txIDs) {
- if (txID >= firstTxIdForDataDistribution) {
- TxBlockInfo txBlockInfo = txSizeMap.remove(txID);
- if (txBlockInfo != null) {
- // txBlockInfosToBeDeleted.add(txBlockInfo);
- descDeletedBlocksSummary(txBlockInfo);
- metrics.incrBlockDeletionTransactionSizeFromCache();
- } else {
- // Fetch the transaction from DB to get the size. This happens
during
- // 1. SCM leader transfer, deletion command send by one SCM,
- // while the deletion ack received by a different SCM
- // 2. SCM restarts, txBlockInfoMap is empty, while receiving the
deletion ack from DN
- txToQueryList.add(txID);
- metrics.incrBlockDeletionTransactionSizeFromDB();
- }
+ TxBlockInfo txBlockInfo = txSizeMap.remove(txID);
+ if (txBlockInfo != null) {
+ // txBlockInfosToBeDeleted.add(txBlockInfo);
Review Comment:
Resolved.
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/SCMDeletedBlockTransactionStatusManager.java:
##########
@@ -489,20 +481,13 @@ public void removeTransactions(ArrayList<Long> txIDs)
throws IOException {
!disableDataDistributionForTest) {
ArrayList<Long> txToQueryList = new ArrayList<>();
for (Long txID: txIDs) {
- if (txID >= firstTxIdForDataDistribution) {
- TxBlockInfo txBlockInfo = txSizeMap.remove(txID);
- if (txBlockInfo != null) {
- // txBlockInfosToBeDeleted.add(txBlockInfo);
- descDeletedBlocksSummary(txBlockInfo);
- metrics.incrBlockDeletionTransactionSizeFromCache();
- } else {
- // Fetch the transaction from DB to get the size. This happens
during
- // 1. SCM leader transfer, deletion command send by one SCM,
- // while the deletion ack received by a different SCM
- // 2. SCM restarts, txBlockInfoMap is empty, while receiving the
deletion ack from DN
- txToQueryList.add(txID);
- metrics.incrBlockDeletionTransactionSizeFromDB();
- }
+ TxBlockInfo txBlockInfo = txSizeMap.remove(txID);
+ if (txBlockInfo != null) {
+ // txBlockInfosToBeDeleted.add(txBlockInfo);
+ descDeletedBlocksSummary(txBlockInfo);
+ metrics.incrBlockDeletionTransactionSizeFromCache();
+ } else {
+ txToQueryList.add(txID);
Review Comment:
Resolved.
--
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]