HDDS-14844. Update reconOmTasks memory counter using init after reinit#9933
Open
priyeshkaratha wants to merge 2 commits intoapache:masterfrom
Open
HDDS-14844. Update reconOmTasks memory counter using init after reinit#9933priyeshkaratha wants to merge 2 commits intoapache:masterfrom
priyeshkaratha wants to merge 2 commits intoapache:masterfrom
Conversation
c62d114 to
f5d0dab
Compare
devmadhuu
reviewed
Mar 20, 2026
Contributor
devmadhuu
left a comment
There was a problem hiding this comment.
Thanks @priyeshkaratha for the patch. Changes LGTM + 1. Just few nits.
.../java/org/apache/hadoop/ozone/recon/tasks/TestOmTableInsightTaskStaleCounterAfterReinit.java
Outdated
Show resolved
Hide resolved
...p-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/tasks/ReconTaskControllerImpl.java
Show resolved
Hide resolved
devmadhuu
approved these changes
Mar 20, 2026
Contributor
devmadhuu
left a comment
There was a problem hiding this comment.
Thanks @priyeshkaratha for improving the patch. LGTM +1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This pull request resolves a data consistency issue within Recon's task management by ensuring that after a reprocess operation, the system correctly re -initialize in memory maps which could lead to incorrect data aggregation. The changes also enhance the robustness of the re-initialization process with improved error handling and are thoroughly validated by a new dedicated test case.
The reInitializeTasks method in ReconTaskControllerImpl was updated to call init. This ensures that subsequent delta events are processed by the fresh in-memory state of the tasks, preventing stale data issues.
A new JUnit test, TestOmTableInsightTaskStaleCounterAfterReinit, was added. This test provides end-to-end validation that reInitializeTasks correctly updates counters after re-initialization, specifically demonstrating the fix for stale counter issues.
What is the link to the Apache JIRA
HDDS-14844
How was this patch tested?
Tested using unit testcase, TestOmTableInsightTaskStaleCounterAfterReinit