Skip to content

WIP: Support delete in upserts#10035

Draft
KKcorps wants to merge 10 commits intoapache:masterfrom
KKcorps:delete_upsert
Draft

WIP: Support delete in upserts#10035
KKcorps wants to merge 10 commits intoapache:masterfrom
KKcorps:delete_upsert

Conversation

@KKcorps
Copy link
Contributor

@KKcorps KKcorps commented Dec 26, 2022

Use two new configs -

      "deleteRecordKey": "delete"

Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is one corner case not handled. When a record is deleted, we might want to track its timestamp to guarantee consistency for late event. This could cause much bigger map size thus revoke the benefit of deletion. We can further discuss the tradeoffs

@kishoreg
Copy link
Member

can we see all the configs related to upsert? lets try to keep the config keys intuitive and follow some pattern

@KKcorps
Copy link
Contributor Author

KKcorps commented Dec 26, 2022

There is one corner case not handled. When a record is deleted, we might want to track its timestamp to guarantee consistency for late event. This could cause much bigger map size thus revoke the benefit of deletion. We can further discuss the tradeoffs

I think we can keep that in the state for now. The current ask is to just support deleting the record afaik (i.e. to mark it as invalid). Reducing the state size can be thought of as an optimization.

@KKcorps
Copy link
Contributor Author

KKcorps commented Dec 26, 2022

can we see all the configs related to upsert? lets try to keep the config keys intuitive and follow some pattern

Definitely. This is just a Draft PR. I thought about using the existing Upsert.Mode config but it was not sufficient

@codecov-commenter
Copy link

codecov-commenter commented Dec 29, 2022

Codecov Report

Merging #10035 (1625af5) into master (431b918) will decrease coverage by 0.07%.
The diff coverage is 62.85%.

@@             Coverage Diff              @@
##             master   #10035      +/-   ##
============================================
- Coverage     70.42%   70.34%   -0.08%     
- Complexity     5691     5697       +6     
============================================
  Files          1994     1994              
  Lines        107508   107579      +71     
  Branches      16340    16353      +13     
============================================
- Hits          75709    75679      -30     
- Misses        26502    26599      +97     
- Partials       5297     5301       +4     
Flag Coverage Δ
integration1 24.99% <8.57%> (-0.04%) ⬇️
integration2 24.46% <8.57%> (-0.02%) ⬇️
unittests1 67.91% <62.85%> (-0.02%) ⬇️
unittests2 13.57% <0.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...local/indexsegment/mutable/MutableSegmentImpl.java 57.46% <33.33%> (-0.29%) ⬇️
...rg/apache/pinot/spi/config/table/UpsertConfig.java 72.34% <33.33%> (-2.66%) ⬇️
...t/ConcurrentMapPartitionUpsertMetadataManager.java 67.22% <61.53%> (-0.70%) ⬇️
...ache/pinot/segment/local/utils/IngestionUtils.java 29.77% <71.42%> (+1.70%) ⬆️
...manager/realtime/LLRealtimeSegmentDataManager.java 70.85% <100.00%> (+0.03%) ⬆️
...ent/local/realtime/impl/RealtimeSegmentConfig.java 92.42% <100.00%> (ø)
...g/apache/pinot/server/api/resources/ErrorInfo.java 0.00% <0.00%> (-100.00%) ⬇️
.../apache/pinot/common/metrics/MinionQueryPhase.java 0.00% <0.00%> (-100.00%) ⬇️
...data/manager/realtime/DefaultSegmentCommitter.java 0.00% <0.00%> (-80.00%) ⬇️
...t/server/api/resources/DefaultExceptionMapper.java 0.00% <0.00%> (-75.00%) ⬇️
... and 39 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@KKcorps KKcorps marked this pull request as ready for review December 29, 2022 21:33
@KKcorps KKcorps changed the title WIP: Support delete in upserts Support delete in upserts Dec 29, 2022
@KKcorps KKcorps changed the title Support delete in upserts WIP: Support delete in upserts Dec 31, 2022
@KKcorps KKcorps marked this pull request as draft January 1, 2023 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants