deepthi912 commented on code in PR #19710:
URL: https://github.com/apache/pinot/pull/19710#discussion_r4149774332


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java:
##########
@@ -1225,6 +1228,28 @@ static void validateUpsertAndDedupConfig(TableConfig 
tableConfig, Schema schema,
     }
   }
 
+  /// Rejects consuming the next segment during a download on tables that 
revert upsert metadata in PROTECTED mode,
+  /// because the next segment's snapshot would run before the revert and miss 
the rows it restores.
+  @VisibleForTesting
+  static void validateConsumptionDuringDownloadWithUpsertRevert(TableConfig 
tableConfig) {
+    if (tableConfig.getTableType() != TableType.REALTIME || 
!isTableTypeInconsistentDuringConsumption(tableConfig)
+        || 
ConsumingSegmentConsistencyModeListener.getInstance().getConsistencyMode()
+        != ConsumingSegmentConsistencyModeListener.Mode.PROTECTED) {
+      return;
+    }
+    IngestionConfig ingestionConfig = tableConfig.getIngestionConfig();

Review Comment:
   I am thinking along with this condition, let's also check for 
`_enforceConsumptionInOrder` 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]

Reply via email to