ArafatKhan2198 commented on code in PR #7796:
URL: https://github.com/apache/ozone/pull/7796#discussion_r1958138732
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/ReconConstants.java:
##########
@@ -90,4 +92,15 @@ private ReconConstants() {
(double) MAX_CONTAINER_SIZE_UPPER_BOUND /
MIN_CONTAINER_SIZE_UPPER_BOUND) /
Math.log(2)) + 1;
+
+ // For file-size count reprocessing: ensure only one task truncates the
table.
+ public static final AtomicBoolean TABLE_TRUNCATED = new AtomicBoolean(false);
+
+ /**
+ * Resets the table-truncated flag. This should be called once per reprocess
cycle,
+ * for example by the OM task controller, before the tasks run.
+ */
+ public static void resetTableTruncatedFlag() {
+ TABLE_TRUNCATED.set(false);
Review Comment:
We will now call this method to reset the truncate table flag every time the
reprocess method is invoked by the `ReconTaskControllerImpl` methods
`consumeOMEvents()` and` reInitializeTasks()`. These two methods trigger the
reprocess methods of both `FileSizeCountTask` classes. Therefore, it is
essential to reset the flag whenever this occurs.
--
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]