Skip to content

Conversation

@DrakeLin
Copy link
Collaborator

What changes are proposed in this pull request?

This PR refactors the internal state management for domain metadata operations to separate additions and removals, cleaning up the internal representation.

How was this change tested?

Existing tests

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 98.24561% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 84.78%. Comparing base (733a117) to head (88c0c2f).

Files with missing lines Patch % Lines
kernel/src/transaction/mod.rs 98.24% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1421      +/-   ##
==========================================
- Coverage   84.79%   84.78%   -0.01%     
==========================================
  Files         118      118              
  Lines       30366    30376      +10     
  Branches    30366    30376      +10     
==========================================
+ Hits        25748    25755       +7     
- Misses       3387     3390       +3     
  Partials     1231     1231              

☔ 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.

flushing comments

Comment on lines 139 to 142
domain_metadatas_to_add: Vec<DomainMetadata>,
// Domain names to remove in this transaction. The configuration values are fetched during
// commit from the log to preserve the pre-image in tombstones.
domains_to_remove: Vec<String>,
Copy link
Member

Choose a reason for hiding this comment

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

add_domain_metadata, remove_domains ?

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.

couple quick things to check, else LGTM

Comment on lines +469 to +471
.domain_metadata_additions
.clone()
.into_iter()
Copy link
Member

Choose a reason for hiding this comment

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

hm.. cloning everything since this method takes &self? is it only used in commit (which takes self)? if so should we just make this take self too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

commit uses self later in the function, so we'd need to use &mut self + std::mem::take(), but it gets annoying because:

  • commit would need to be mut self
  • We'd leave the transaction in a partially-moved state mid-function

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will leave as is, with room for optimization later

@DrakeLin DrakeLin merged commit 5058bce into delta-io:main Oct 27, 2025
20 checks passed
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.

3 participants