-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: failed upload retry #15862
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: master
Are you sure you want to change the base?
fix: failed upload retry #15862
Conversation
|
|
||
| val fileEntity = | ||
| fileDataStorageManager.fileDao.getFileByDecryptedRemotePath(remotePath, user.accountName) | ||
| if (fileEntity != null) { |
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.
Check existence file on remote
| continue | ||
| } | ||
|
|
||
| uploads.add(failedUpload.uploadId) |
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.
Only add checked failed uploads.
| val remotePath = upload.remotePath ?: continue | ||
| val fileExists = | ||
| fileStorageManager.fileDao.getFileByDecryptedRemotePath(remotePath, accountName) != null | ||
| if (fileExists) { |
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.
Check existence file on remote
tobiasKaminsky
left a comment
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.
Please obey settings for sync conflict.
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
516fc83 to
e22ee13
Compare
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
|
blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed. |
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/15862.apk |
|
Better to split this PR so that we can proceed faster and easy to review. |


Issue
After a failed auto-upload or manual upload, some entities remain marked as failed. As a result, the same uploads are triggered again (due to SYNC_CONFLICT, wrongly chosen failed upload IDs for upload) on every app launch or pull-to-refresh from various screens.
Changes
Checks for the existence of the file at the remote path and removes the corresponding upload entity if the file already exists
Fixes DB update
Chooses failed uploads correctly