Skip to content

Conversation

MannDP
Copy link
Collaborator

@MannDP MannDP commented Sep 9, 2025

What changes are proposed in this pull request?

This PR is (1/2) to support writing domain metadata.

  1. (this PR) support adding or updating a domain metadata configuration
  2. (follow up) support removing a domain metadata, feat: support writing domain metadata (2/2) #1275.

Writing domain metadata, as per the Delta protocol requires:

  • The table must be on writer version 7, and a feature named domainMetadata must exist in the table's writerFeatures. We satisfy this via an explicit check in Transaction::commit.
  • Two overlapping transactions conflict if they both contain a domain metadata action for the same metadata domain. We satisfy this with Kernel's coarse grained conflict detection based on the fact that the delta_log dir already has a log file with the name this txn was going to write. No new logic needed in this PR.

How was this change tested?

Added new integration tests in write.rs.

@MannDP MannDP self-assigned this Sep 9, 2025
Copy link

codecov bot commented Sep 9, 2025

Codecov Report

❌ Patch coverage is 94.07407% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.55%. Comparing base (93f3f30) to head (ec20fed).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
kernel/src/transaction/mod.rs 94.95% 0 Missing and 6 partials ⚠️
test-utils/src/lib.rs 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1274      +/-   ##
==========================================
+ Coverage   84.48%   84.55%   +0.06%     
==========================================
  Files         113      113              
  Lines       27948    28009      +61     
  Branches    27948    28009      +61     
==========================================
+ Hits        23612    23683      +71     
+ Misses       3197     3189       -8     
+ Partials     1139     1137       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@zachschuermann zachschuermann left a comment

Choose a reason for hiding this comment

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

quick drive-by review, dropping a few comments

@MannDP MannDP force-pushed the manndp/write_domain_metadata branch from 305ddbf to 713a21c Compare September 9, 2025 22:21
@MannDP MannDP marked this pull request as ready for review September 9, 2025 22:32
@MannDP MannDP changed the title feat: support domain metadata writes feat: support domain metadata writes (1/2) Sep 9, 2025
@MannDP MannDP changed the title feat: support domain metadata writes (1/2) feat: support writing domain metadata (1/2) Sep 9, 2025
@MannDP MannDP changed the title feat: support writing domain metadata (1/2) <WIP> feat: support writing domain metadata (1/2) Sep 10, 2025
@MannDP MannDP marked this pull request as draft September 10, 2025 17:42
@MannDP MannDP changed the title <WIP> feat: support writing domain metadata (1/2) feat: support writing domain metadata (1/2) Sep 10, 2025
@MannDP MannDP marked this pull request as ready for review September 10, 2025 20:32
@MannDP MannDP marked this pull request as draft September 10, 2025 20:49
@MannDP MannDP changed the title feat: support writing domain metadata (1/2) <WIP> feat: support writing domain metadata (1/2) Sep 10, 2025
@MannDP MannDP changed the title <WIP> feat: support writing domain metadata (1/2) feat: support writing domain metadata (1/2) Sep 10, 2025
@MannDP MannDP marked this pull request as ready for review September 10, 2025 23:57
Copy link
Collaborator

@lbhm lbhm left a comment

Choose a reason for hiding this comment

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

Flushing some comments based on a quick skim. I did not look at the new tests.

Copy link
Member

@zachschuermann zachschuermann left a comment

Choose a reason for hiding this comment

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

gonna definitely have conflicts with #1239, perhaps should just block on that merging. also - can we take on the stuff i mentioned here: #1239 (comment) ?

@MannDP MannDP changed the title feat: support writing domain metadata (1/2) <wip> feat: support writing domain metadata (1/2) Sep 12, 2025
@MannDP MannDP marked this pull request as draft September 12, 2025 20:05
@MannDP MannDP force-pushed the manndp/write_domain_metadata branch from c7f5f6b to 7d90c15 Compare September 12, 2025 22:32
@MannDP MannDP force-pushed the manndp/write_domain_metadata branch from 7d90c15 to f854284 Compare September 15, 2025 18:30
@MannDP MannDP force-pushed the manndp/write_domain_metadata branch from 7892501 to c475873 Compare September 16, 2025 16:30
@MannDP MannDP force-pushed the manndp/write_domain_metadata branch from 22b5b3c to 9c89f0e Compare September 16, 2025 17:54
@github-actions github-actions bot added the breaking-change Change that require a major version bump label Sep 16, 2025
Copy link
Collaborator

@nicklan nicklan left a comment

Choose a reason for hiding this comment

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

looks great thanks, just a couple small things

@MannDP MannDP force-pushed the manndp/write_domain_metadata branch from d99ebae to 6f13346 Compare September 17, 2025 23:35
@MannDP MannDP requested a review from nicklan September 17, 2025 23:54
@MannDP MannDP force-pushed the manndp/write_domain_metadata branch from 3dbc7ab to 6f13346 Compare September 18, 2025 00:03
Ok(())
}

pub fn assert_result_error_with_message<T, E: ToString>(res: Result<T, E>, message: &str) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Duplicating this method does not feel right to me. Should we rather move it here and import the method from the test_utils dependency in the main crate?
@zachschuermann, what do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i looked into doing that this pr, but then the PR diff blows up. #1319 shows how the removal is to be done.

  1. this would make a good starter task (if we want one)
  2. duplicating a method is bad, but this is a simple test util so it's not a big deal

if we think it is a blocker, then i will open the pr linked above as a real pr and get it in.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm fine with the approach you suggested. I guess Zach has to make the call here.

Copy link
Member

Choose a reason for hiding this comment

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

yea we can just take in follow-up

@MannDP MannDP force-pushed the manndp/write_domain_metadata branch from 0609301 to a0db3e5 Compare September 18, 2025 17:18
@MannDP MannDP force-pushed the manndp/write_domain_metadata branch from a0db3e5 to 7fc906f Compare September 18, 2025 17:19
Copy link
Collaborator

@nicklan nicklan left a comment

Choose a reason for hiding this comment

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

lgtm! thanks

Copy link
Member

@zachschuermann zachschuermann left a comment

Choose a reason for hiding this comment

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

looks good after we close on a few final things! thanks @MannDP!!

Ok(())
}

pub fn assert_result_error_with_message<T, E: ToString>(res: Result<T, E>, message: &str) {
Copy link
Member

Choose a reason for hiding this comment

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

yea we can just take in follow-up

@MannDP MannDP force-pushed the manndp/write_domain_metadata branch from 2ba9817 to ec20fed Compare September 24, 2025 20:12
@MannDP MannDP merged commit 05e6698 into delta-io:main Sep 24, 2025
21 checks passed
@MannDP MannDP deleted the manndp/write_domain_metadata branch September 24, 2025 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Change that require a major version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support domain metadata writes
4 participants