You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "deepthi912 (via GitHub)" <gi...@apache.org> on 2025/03/13 23:59:20 UTC

[PR] Donot allow consumption for Dedup Tables & Full Upserts with Drop Out of Order Record enabled [pinot]

deepthi912 opened a new pull request, #15268:
URL: https://github.com/apache/pinot/pull/15268

   The consumption for slow replicas should be disabled in all of the following scenarios when replacing the consuming segments:
    1. Partial Upserts
    2. Dedup Tables
    3. Full Upserts with Drop Out of Order enabled.
    
   For all the above scenarios, we would be looking into the metadata information when inserting a new record, and
   so it is not ideal to allow consumption when downloading and replacing the consuming segment as we might see
   unusual behaviour of duplicates in dedup tables and inconsistent entries compared to lead replicas for upsert
   tables when dropOut of order is enabled. For full upserts, all the entries will be appended when drop out of order record is disabled which is the case by default.


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Donot allow consumption for Dedup Tables enabled during segment download and replacement [pinot]

Posted by "klsince (via GitHub)" <gi...@apache.org>.
klsince commented on code in PR #15268:
URL: https://github.com/apache/pinot/pull/15268#discussion_r1996345949


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/dedup/TableDedupMetadataManagerFactory.java:
##########
@@ -39,6 +39,9 @@ private TableDedupMetadataManagerFactory() {
   public static final String DEDUP_DEFAULT_METADATA_MANAGER_CLASS = "default.metadata.manager.class";
   public static final String DEDUP_DEFAULT_ENABLE_PRELOAD = "default.enable.preload";
 
+  public static final String DEDUP_DEFAULT_ALLOW_PARTIAL_DEDUP_CONSUMPTION_DURING_COMMIT =
+      "default.allow.partial.dedup.consumption.during.commit";

Review Comment:
   remove `partial` from var name and the config name



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Donot allow consumption for Dedup Tables enabled during segment download and replacement [pinot]

Posted by "noob-se7en (via GitHub)" <gi...@apache.org>.
noob-se7en commented on code in PR #15268:
URL: https://github.com/apache/pinot/pull/15268#discussion_r1998117808


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java:
##########
@@ -1725,6 +1723,20 @@ public RealtimeSegmentDataManager(SegmentZKMetadata segmentZKMetadata, TableConf
     }
   }
 
+  // Consumption while downloading and replacing the slow replicas is not allowed for the following tables:

Review Comment:
   But we should not honor this flag when segment is built by the slow server and it's replacing the mutable segment by the same version of immutable segment. Currently I see we block consumption of next segment in this case.



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Donot allow consumption for Dedup Tables enabled during segment download and replacement [pinot]

Posted by "klsince (via GitHub)" <gi...@apache.org>.
klsince merged PR #15268:
URL: https://github.com/apache/pinot/pull/15268


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Donot allow consumption for Dedup Tables & Full Upserts with Drop Out of Order Record enabled during segment replacement [pinot]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #15268:
URL: https://github.com/apache/pinot/pull/15268#issuecomment-2723023524

   ## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/15268?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: Patch coverage is `33.33333%` with `4 lines` in your changes missing coverage. Please review.
   > Project coverage is 63.52%. Comparing base [(`59551e4`)](https://app.codecov.io/gh/apache/pinot/commit/59551e45224f1535c4863fd577622b37366ccc97?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`4c2ec34`)](https://app.codecov.io/gh/apache/pinot/commit/4c2ec342fea02dc2c975d4bd8935bbd588c0c7e8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 1843 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/pinot/pull/15268?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...a/manager/realtime/RealtimeSegmentDataManager.java](https://app.codecov.io/gh/apache/pinot/pull/15268?src=pr&el=tree&filepath=pinot-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fcore%2Fdata%2Fmanager%2Frealtime%2FRealtimeSegmentDataManager.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9kYXRhL21hbmFnZXIvcmVhbHRpbWUvUmVhbHRpbWVTZWdtZW50RGF0YU1hbmFnZXIuamF2YQ==) | 33.33% | [1 Missing and 3 partials :warning: ](https://app.codecov.io/gh/apache/pinot/pull/15268?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #15268      +/-   ##
   ============================================
   + Coverage     61.75%   63.52%   +1.77%     
   - Complexity      207     1367    +1160     
   ============================================
     Files          2436     2774     +338     
     Lines        133233   156257   +23024     
     Branches      20636    23985    +3349     
   ============================================
   + Hits          82274    99269   +16995     
   - Misses        44911    49494    +4583     
   - Partials       6048     7494    +1446     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/pinot/pull/15268/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/15268/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration](https://app.codecov.io/gh/apache/pinot/pull/15268/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration1](https://app.codecov.io/gh/apache/pinot/pull/15268/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration2](https://app.codecov.io/gh/apache/pinot/pull/15268/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-11](https://app.codecov.io/gh/apache/pinot/pull/15268/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-21](https://app.codecov.io/gh/apache/pinot/pull/15268/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.52% <33.33%> (+1.90%)` | :arrow_up: |
   | [skip-bytebuffers-false](https://app.codecov.io/gh/apache/pinot/pull/15268/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.51% <33.33%> (+1.76%)` | :arrow_up: |
   | [skip-bytebuffers-true](https://app.codecov.io/gh/apache/pinot/pull/15268/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.50% <33.33%> (+35.78%)` | :arrow_up: |
   | [temurin](https://app.codecov.io/gh/apache/pinot/pull/15268/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.52% <33.33%> (+1.77%)` | :arrow_up: |
   | [unittests](https://app.codecov.io/gh/apache/pinot/pull/15268/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.52% <33.33%> (+1.78%)` | :arrow_up: |
   | [unittests1](https://app.codecov.io/gh/apache/pinot/pull/15268/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.03% <33.33%> (+9.14%)` | :arrow_up: |
   | [unittests2](https://app.codecov.io/gh/apache/pinot/pull/15268/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `34.18% <0.00%> (+6.45%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/pinot/pull/15268?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   <details><summary>🚀 New features to boost your workflow: </summary>
   
   - ❄ [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - 📦 [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Donot allow consumption for Dedup Tables enabled during segment download and replacement [pinot]

Posted by "noob-se7en (via GitHub)" <gi...@apache.org>.
noob-se7en commented on code in PR #15268:
URL: https://github.com/apache/pinot/pull/15268#discussion_r1998119910


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java:
##########
@@ -1725,6 +1723,20 @@ public RealtimeSegmentDataManager(SegmentZKMetadata segmentZKMetadata, TableConf
     }
   }
 
+  // Consumption while downloading and replacing the slow replicas is not allowed for the following tables:

Review Comment:
   For upserts I think we should honor the flag, because we are taking snapshot before next consumer starts consuming. But for dedup I think we should allow next consumer to consume in above case.



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Donot allow consumption for Dedup Tables enabled during segment download and replacement [pinot]

Posted by "noob-se7en (via GitHub)" <gi...@apache.org>.
noob-se7en commented on code in PR #15268:
URL: https://github.com/apache/pinot/pull/15268#discussion_r1998686009


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java:
##########
@@ -1725,6 +1723,20 @@ public RealtimeSegmentDataManager(SegmentZKMetadata segmentZKMetadata, TableConf
     }
   }
 
+  // Consumption while downloading and replacing the slow replicas is not allowed for the following tables:

Review Comment:
   https://github.com/apache/pinot/pull/15296



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] Donot allow consumption for Dedup Tables enabled during segment download and replacement [pinot]

Posted by "klsince (via GitHub)" <gi...@apache.org>.
klsince commented on code in PR #15268:
URL: https://github.com/apache/pinot/pull/15268#discussion_r1996097154


##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java:
##########
@@ -1725,6 +1723,19 @@ public RealtimeSegmentDataManager(SegmentZKMetadata segmentZKMetadata, TableConf
     }
   }
 
+  // Consumption while downloading and replacing the slow replicas is not allowed for the following use cases:
+  // 1. Partial Upserts
+  // 2. Dedup Tables
+  // For the above table types, we would be looking into the metadata information when inserting a new record,
+  // so it is not ideal to allow consumption when downloading and replacing the consuming segment as we might see
+  // unusual behaviour of duplicates in dedup tables and inconsistent entries compared to lead replicas for partial
+  // upsert tables.
+  private boolean isConsumptionAllowedDuringCommit() {
+    return (!_realtimeTableDataManager.isPartialUpsertEnabled() && !_realtimeTableDataManager.isDedupEnabled()) || (
+        _tableConfig.getUpsertConfig() != null && _tableConfig.getUpsertConfig()
+            .isAllowPartialUpsertConsumptionDuringCommit());

Review Comment:
   maybe this? so it's more clear that isAllowPartialUpsertConsumptionDuringCommit is only used for upsert table. 
   ```
   return !_realtimeTableDataManager.isDedupEnabled() && (!_realtimeTableDataManager.isPartialUpsertEnabled() || _tableConfig.getUpsertConfig().isAllowPartialUpsertConsumptionDuringCommit())
   ```



##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeSegmentDataManager.java:
##########
@@ -1725,6 +1723,19 @@ public RealtimeSegmentDataManager(SegmentZKMetadata segmentZKMetadata, TableConf
     }
   }
 
+  // Consumption while downloading and replacing the slow replicas is not allowed for the following use cases:
+  // 1. Partial Upserts
+  // 2. Dedup Tables
+  // For the above table types, we would be looking into the metadata information when inserting a new record,
+  // so it is not ideal to allow consumption when downloading and replacing the consuming segment as we might see
+  // unusual behaviour of duplicates in dedup tables and inconsistent entries compared to lead replicas for partial
+  // upsert tables.

Review Comment:
   nit: Consumption while downloading and replacing the `consuming segment` on slow replicas ...
   
   nit: ... so it's not right to allow consumption .. as we might see duplicates in dedup tables or inconsistent entries in partial upsert table



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org