-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Use a single map to store and update the previous Record location keys when reverting Upsert Metadata #17503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
deepthi912
wants to merge
92
commits into
apache:master
Choose a base branch
from
deepthi912:singleMap
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
reverse merge
reverse merge
reverse merge
reverse merge
reverse merge
reverse merge
reverse merge
merge master
merge master
merge master
merge master
merge master
reverse merge
reverse merge
reverse merge
reverse merge
reverse merge
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #17503 +/- ##
============================================
- Coverage 63.18% 63.16% -0.03%
Complexity 1479 1479
============================================
Files 3173 3173
Lines 189917 189968 +51
Branches 29064 29084 +20
============================================
- Hits 120002 119996 -6
- Misses 60575 60640 +65
+ Partials 9340 9332 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
reverse merge
pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java
Outdated
Show resolved
Hide resolved
pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java
Outdated
Show resolved
Hide resolved
pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java
Outdated
Show resolved
Hide resolved
pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/pinot/core/data/manager/realtime/UpsertInconsistentStateConfig.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/pinot/core/data/manager/realtime/UpsertInconsistentStateConfig.java
Outdated
Show resolved
Hide resolved
pinot-spi/src/main/java/org/apache/pinot/spi/utils/ConsumingSegmentCommitModeProvider.java
Outdated
Show resolved
Hide resolved
pinot-spi/src/main/java/org/apache/pinot/spi/utils/ConsumingSegmentCommitModeProvider.java
Outdated
Show resolved
Hide resolved
pinot-spi/src/main/java/org/apache/pinot/spi/utils/ConsumingSegmentCommitModeProvider.java
Outdated
Show resolved
Hide resolved
pinot-spi/src/main/java/org/apache/pinot/spi/utils/UpsertInconsistentStateConfig.java
Outdated
Show resolved
Hide resolved
reverse merge
reverse merge
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Much better way of reverting keys is having single source of truth map to revert the primary keys in Upserts and have a single abstraction than distributing the keys to two different maps. This helps us keep the code error prone and easy to understand.
Modified the server config:
pinot.server.consuming.segment.consistency.modeto take in three modes for force commit/Reload on Partial Upsert Tables and Upsert Tables withdropOutOfOrder.The three modes are as follows:
dropOutOfOrder=true andconsistencyMode=NONE with RF>1. This mode is enabled by default.Note:
DISALLOW_ALWAYSorALLOW_DURING_BUILD_ONLYfor the Partial Upsert and Upsert Tables with dropOutOfOrder=true when consistencyMode = NONE to avoid any inconsistencies inPROTECTEDmode. Otherwise, we might see inconsistent records across servers if at any given point we have two segments in Mutable state. Refer: Allows consumption during build for dedup/partial-upsert #15296AddRecord:
Replace Segment:
After Replacement: In Revert and Remove Segment
Remove Segment:
Improvisation for: #17324
Success Criteria:
Consuming Segment Reload
Expected behaviour: Consuming segment reload will force commit consuming segment, so no in consistencies should be seen between the replicas.
Force Commit
Expected behaviour: Force commit when PROTECTED is enabled should not lead to any inconsistencies between replicas.
Consuming segment removal
Expected behaviour: All the metadata of the consuming segment should be either reverted to previous location or new keys should be removed completely from the upsert metadata when PROTECTED mode is enabled.
ParallelSegmentConsumptionPolicy : ALLOW_ALWAYS(true, true), ALLOW_DURING_BUILD_ONLY(true, false), ALLOW_DURING_DOWNLOAD_ONLY(false, true), DISALLOW_ALWAYS
Expected behaviour: DISALLOW_ALWAYS and ALLOW_DURING_BUILD_ONLY should have no discrepencies. In other scenarios, we need to have metrics and alerts generated in case of inconsistencies
Try out on 3 modes of consuming segment commit protection: NONE, PROTECTED, UNSAFE for the property:
pinot.server.consuming.segment.consistency.mode