-
Notifications
You must be signed in to change notification settings - Fork 17
IBX-10233: Fixed iterating over a batch of files in ibexa:io:migrate-files command
#661
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
base: 4.6
Are you sure you want to change the base?
IBX-10233: Fixed iterating over a batch of files in ibexa:io:migrate-files command
#661
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug in the file migration command where the migration process would terminate prematurely if an entire batch of files was missing. The fix changes the loop termination condition from checking if the current batch has files to verifying if there are more files to process based on the total file count.
Key Changes:
- Store the total file count before starting the migration loop
- Calculate offset explicitly for better readability
- Replace batch-based loop condition with offset-based condition that checks against total file count
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ibexa:io:migrate-files command
…g (ibexa:io:migrate-files)
b8caedf to
e0d806a
Compare
|



Description:
If all files in the current bulk are missing, then
$metadataList($metadataList = $fileLister->loadMetadataList($bulkCount, $offset);) will be a empty list. This will cause the loop to be exited prematurely (while (count($metadataList) > 0))For QA:
Documentation: