Skip to content

Add delay-updates support across CLI and engine - #1099

Merged
oferchen merged 1 commit into
masterfrom
implement-missing-components-for-oc-rsync-9bew3s
Oct 25, 2025
Merged

oferchen merged 1 commit into
masterfrom
implement-missing-components-for-oc-rsync-9bew3s

Conversation

@oferchen

@oferchen oferchen commented Oct 25, 2025 •

Copy link
Copy Markdown
Owner

Summary

  • add --delay-updates/--no-delay-updates handling to the CLI and propagate the flag through parsed configuration
  • forward delay-updates to remote fallback invocations and cover the behaviour with unit tests
  • honour delayed update queues in the engine, including hard-link flushes, with targeted regression tests

Testing

  • cargo test

@oferchen
oferchen merged commit 28ef7c6 into master Oct 25, 2025
@oferchen
oferchen deleted the implement-missing-components-for-oc-rsync-9bew3s branch October 25, 2025 01:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +5829 to +5835
Err(error)
if error.kind() == io::ErrorKind::NotFound
&& context.delay_updates_enabled()
&& !attempted_commit =>
{
context.commit_delayed_update_for(&existing_target)?;
attempted_commit = true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid early commits when handling hard links

The hard-link creation path commits queued delayed updates when the target file does not yet exist (commit_delayed_update_for). With --delay-updates, this makes the first member of a hard-link set visible as soon as another link references it, even if the overall transfer later fails. The command-line help and LocalCopyOptions::delay_updates promise to move updated files into place only after the transfer finishes, so committing here defeats the purpose of delayed updates and can leave a partially updated destination after an error. Hard links should either be staged alongside the other delayed updates or resolved against the temporary file rather than finalising early.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant