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

[Spark] Introduce Redirect ReaderWriter Feature #3812

Merged
merged 1 commit into from
Oct 26, 2024

Conversation

kamcheungting-db
Copy link
Contributor

Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (fill in here)

Description

This PR introduces a new reader-writer table feature "redirection". This table feature would redirect the read and write query from the current storage location to a new storage location described inside the value of table feature.

The redirection has several phases to ensure no anomaly. To label these phases, we introduces four states:

  1. NO-REDIRECT: This state indicates that redirect is not enabled on the table.
  2. ENABLE-REDIRECT-IN-PROGRESS: This state indicates that the redirect process is still going on. No DML or DDL transaction can be committed to the table when the table is in this state.
  3. REDIRECT-READY: This state indicates that the redirect process is completed. All types of queries would be redirected to the table specified inside RedirectSpec object.
  4. DROP-REDIRECT-IN-PROGRESS: The table redirection is under withdrawal and the redirection property is going to be removed from the delta table. In this state, the delta client stops redirecting new queries to redirect destination tables, and only accepts read-only queries to access the redirect source table.

To ensure no undefined behavior, the valid procedures of state transition are:

  1. NO-REDIRECT -> ENABLE-REDIRECT-IN-PROGRESS
  2. ENABLE-REDIRECT-IN-PROGRESS -> REDIRECT-READY
  3. REDIRECT-READY -> DROP-REDIRECT-IN-PROGRESS
  4. DROP-REDIRECT-IN-PROGRESS -> NO-REDIRECT
  5. ENABLE-REDIRECT-IN-PROGRESS -> NO-REDIRECT

The protocol RFC document is on: #3702

How was this patch tested?

Unit Test of transition between different states of redirection.

Does this PR introduce any user-facing changes?

No

@kamcheungting-db kamcheungting-db changed the title the initial version of table redirect [Table Redirect] Introduce Redirect ReaderWriter Feature Oct 26, 2024
@vkorukanti vkorukanti merged commit 30d7356 into delta-io:master Oct 26, 2024
16 of 19 checks passed
@kamcheungting-db kamcheungting-db changed the title [Table Redirect] Introduce Redirect ReaderWriter Feature [Spark] Introduce Redirect ReaderWriter Feature Oct 26, 2024
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.

2 participants