Skip to content
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

[Feature]: Introduce a mechanism for concurrency control between Writing and Optimizing #985

Closed
2 tasks done
wangtaohz opened this issue Jan 9, 2023 · 0 comments · Fixed by #986
Closed
2 tasks done
Labels
type:feature Feature Requests
Milestone

Comments

@wangtaohz
Copy link
Contributor

wangtaohz commented Jan 9, 2023

Description

We should introduce a mechanism to address the concurrency issues when Writing and Optimizing happen at the same time.

Use case/motivation

There will be concurrency issues when table writing and optimizing happen at the same time in some cases:

case1:
Spark and Flink write into ChangeStore while self-optimizing is executing. TransactionId of the ChangeStore may be disordered in this case, which will bring data loss after self-optimizing.

case2:
Spark concurrently writes into Arctic Table without conflict detection, especially when Spark writes into ChangeStore, because it's not easy to detect conflict since the delete files in ChangeStore is different from the standard Iceberg Table.

Describe the solution

As described in this proposal
https://docs.google.com/document/d/13ftRtwYU9TXWojtA3jyeH9bVVgSfm2cdSjGYNzHEGKI/edit

We should introduce a mechanism to block operations on the table, like Optimizing and BatchWrite, and avoid the concurrency issue.

We call this mechanism TableBlocker, with the TableBlocker:

  • the follow-up operations should be blocked if they are declared to be blocked
  • the ongoing operations should not be affected

Subtasks

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature Feature Requests
Projects
None yet
1 participant