Skip to content

Conversation

@vycius
Copy link
Contributor

@vycius vycius commented Jan 18, 2026

Replace the external 'split' subprocess and secondary hashing pass with a custom HashingFileWriter.

  • Resolves a race condition where files moved/deleted between the write and hash phases caused export failures.
  • Eliminates redundant I/O by calculating checksums while streaming data to disk.
  • Removes OS dependency on the 'split' binary.
  • Ensures the Table of Contents (TOC) is generated from in-memory metadata for 100% consistency.

closes #7218

@vycius vycius force-pushed the atomic-chunked-export branch from 83fc336 to 6226daa Compare January 18, 2026 08:21
@vycius vycius force-pushed the atomic-chunked-export branch 6 times, most recently from 0579e8b to aa02e28 Compare January 18, 2026 14:47
@dralley
Copy link
Contributor

dralley commented Jan 19, 2026

Thank you for this PR! Seems like good improvements all around.

Just FYI, if you have used AI in any way, just ensure it is documented properly in compliance with our AI policy: https://pulpproject.org/help/more/governance/ai_policy/

Replace the external 'split' subprocess and secondary hashing pass
with a custom HashingFileWriter.

- Resolves a race condition where files moved/deleted between the
  write and hash phases caused export failures.
- Eliminates redundant I/O by calculating checksums while streaming
  data to disk.
- Removes OS dependency on the 'split' binary.
- Ensures the Table of Contents (TOC) is generated from in-memory
  metadata for 100% consistency.

closes pulp#7218

Assisted By: Gemini 3
@vycius vycius force-pushed the atomic-chunked-export branch from aa02e28 to 58112aa Compare January 19, 2026 18:54
@vycius
Copy link
Contributor Author

vycius commented Jan 19, 2026

Thank you for this PR! Seems like good improvements all around.

Just FYI, if you have used AI in any way, just ensure it is documented properly in compliance with our AI policy: https://pulpproject.org/help/more/governance/ai_policy/

Thank you for pointing that out! I wasn't aware of the policy, but I have now updated the commit messages with the 'Assisted-by' tag.

For clarity, I used AI to help refactor the logic, generate the initial test suite, and brainstorm potential edge cases. All suggestions were manually reviewed and verified

Copy link
Contributor

@dralley dralley left a comment

Choose a reason for hiding this comment

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

@ggainey I'll leave this un-merged in case you'd like to review it tomorrow (or on Wednesday given possible PTO)

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.

Race condition in chunked exports leads to missing file hashes in TOC

2 participants