Open prakharjain09 opened 7 months ago
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!
@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? If so, the Delta client would need to be smart to know the ownership removal information is still un-backfilled and don't try to commit to filesystem.
@prakharjain09, @sumeet-db, could you help validate if this question is relevant?
@prakharjain09, at "Converting a managed-commit table to filesystem table" it says:
Write the commit which removes the ownership.
- Either the commit-owner writes the backfilled commit file directly.
Or it writes an unbackfilled commit and ensures that it is backfilled reliably. Until the backfill is done, table will be in unusable state:
- the filesystem based delta clients won't be able to write to such table as they still believe that table has managed-commit enabled.
- the managed-commit aware delta clients won't be able to write to such table as the commit-owner won't accept any new commits. In such a scenario, they could backfill required commit themselves (preferably using PUT-if-absent) to unblock themselves.
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? If so, the Delta client would need to be smart to know the ownership removal information is still un-backfilled and don't try to commit to filesystem.
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? If so, the Delta client would need to be smart to know the ownership removal information is still un-backfilled and don't try to commit to filesystem.
@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. Essentially if the table has managed-commit enabled, then the writer has to do following extra steps if it is not "active" (i.e. table doesn't have an owner):
"managed-commit enabled" => PROTOCOL has managed-commit enabled "managed-commit active" => PROTOCOL has managed-commit enabled and Metadata contains an owner
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 feature request is to allow delta tables whose source of truth for the actual commit is an external commit-owner and not the filesystem (s3, abfs etc)
This is confusing to readers. We should clarify to match what the design actually calls for:
This writer-only table feature request is to allow an external commit-owner 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.
I came here from https://github.com/delta-io/delta-rs/discussions/2455#discussion-6564431. 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 https://github.com/delta-io/delta-rs/discussions/2455#discussion-6564431. 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 https://github.com/delta-io/delta-rs/discussions/2455#discussion-6564431 . 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.
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:
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.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?