-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Protocol Change Request] Delta Coordinated Commits #2598
Comments
Can we remove the checkbox for which project/connector does this apply to? This is a protocol change, it will eventually apply to every one! |
Adds the proposal for spec change for Managed-Commits (see #2598) to the RFC folder.
@prakharjain09, at "Converting a managed-commit table to filesystem table" it says:
After the un-backfilled commit, a managed commits aware delta reader could contact the commit-owner to get recent commits. In that case, the commit-owner would return the commit which removes the ownership? |
…e.getCommits API (#2712) ## Protocol Change Request ### Description of the protocol change This change puts added responsibility on CommitStore to return the latestTableVersion in the CommitStore.getCommits API along with the list of Commits. Protocol RFC issue: #2598 ### Willingness to contribute The Delta Lake Community encourages protocol innovations. Would you or another member of your organization be willing to contribute this feature to the Delta Lake code base? - [x] Yes. I can contribute. - [ ] Yes. I would be willing to contribute with guidance from the Delta Lake community. - [ ] No. I cannot contribute at this time.
@prakharjain09, @sumeet-db, could you help validate if this question is relevant?
|
@felipepessoto Thats correct. The Delta client would need to be smart enough to know:
This above requirements could be baked in the managed-commit spec.
"managed-commit enabled" => PROTOCOL has managed-commit enabled So when a user wants to downgrade and remove managed-commits completely from the table (for compat reasons etc), it will be a 2 step process:
|
This is confusing to readers. We should clarify to match what the design actually calls for:
|
I came here from delta-io/delta-rs#2455 (comment). After giving the proposal a quick read (apologies if I’m missing something) I fear that it may not address or improve my use case in delta-io/delta-rs#2455 (comment). In particular, this proposal does not do much for concurrent writers. In fact, it goes a bit further towards prohibiting the approach I’m exploring than I’ve found in any other spec: “ Multiple clients might try to contact the commit-store for attempting the same commit version. In such a case, the commit-store chooses which request to accept (if any). The commit-store rejects all other requests for that commit version and responds with error - this tells the client that some other writer has succeeded and it should rebase itself.” Could this proposal allow for commit-manager to hand out non-consecutive commit ids? For the specific case of appending new data to a table (not modifying it, not depending on existing data) this works quite well. I feel like it’s a reasonable use case. Maybe commit-manager can take a flag that says “this commit doesn’t care about existing data and can happen at any time” to adopt this behavior? |
Yes managed commits does not solve usecase mentioned in delta-io/delta-rs#2455 (comment) . Rebasing after a physical conflict is needed because things like rowids / inCommitTimstamp and schema evolution do in fact affect even supposedly blind appends. That said, supporting blind appends better is an interesting use case to think about (in order to avoid quadratic cost in commit retries) -- irrespective of this proposal. |
Agreed! |
Renaming "managed commit" to "coordinated commit" to avoid ambiguity with "managed tables". This feature enables coordination with any kind of coordinator - catalogs, databases, key value stores, etc. so is completely independent of catalog-defined table types. |
Feature request
Which Delta project/connector is this regarding?
This will be a PROTOCOL change.
Overview
Today’s Delta commit protocol relies on the filesystem to provide commit atomicity. This writer-only table feature request is to allow an external commit-coordinator to decide whether a commit succeeded instead of relying on filesystem atomicity, similar to Iceberg's metastore tables. The filesystem remains the source of truth about the actual content of commits, and (unlike Iceberg metastore tables) filesystem-based readers can still access the table directly. This allows us to deal with various limitations of delta mentioned below in Motivation section.
Motivation
Today’s Delta commit protocol relies on the filesystem to provide commit atomicity, both for durability and mutual exclusion purposes. This is problematic for several reasons:
1.1. Impossible to keep the catalog and the table state in sync, and the catalog cannot reject commit attempts it wouldn’t like, because it doesn’t even know about them until after they become durable (and visible to readers).
1.2. No clear path to transactions that could span multiple tables and/or involve catalog updates, because filesystem commits cannot be made conditionally or atomically.
2.1. In general, Delta tables have no way to advertise that they are managed by catalog or LogStore X (at endpoint Y)
2.2. Today a table could be configured to use different log stores in different clusters. Each of the LogStore implementations tries to implement put-if-absent on their own. Since these implementations are not aware of each other, this leads to lost commits and table corruption.
2.3. The logStore setting today is cluster-wide, so you can't safely mix tables with different logStores.
3.1 We need a way where we can commit to multiple tables at once, allowing us to support multi-table transactions.
Further details
The detail proposal and the required protocol changes are sketched out in this doc.
At high level: We propose a new Delta writer table feature,
coordinatedCommits
. The table feature includes the following capabilities:coordinateCommits
.coordinated commits
can include metadata (dictated by the table’s commit coordinator) that would-be writers can use to correctly perform a commit.a. The commit-store writes the actions in a unique commit file.
b. The commit-store then does a commit as per its spec.
Willingness to contribute
The Delta Lake Community encourages new feature contributions. Would you or another member of your organization be willing to contribute an implementation of this feature?
The text was updated successfully, but these errors were encountered: