Skip to content

Conversation

@alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Feb 6, 2026

  • Tests written, or not not needed

Changes

The upload operation only requires read access to the file channel. Exclusive locking is unnecessary and can cause LOCK_FAILED errors when multiple uploads are triggered for the same local path. This change allows concurrent read access.

When a local file is detected as not eligible for auto-upload, both the auto-upload entity and the corresponding upload entity are removed from the database before continuing.

The upload file operation uses a remote existence check to determine whether a sync conflict has occurred. However, this approach is not accurate when the exact same file already exists on the remote; in such cases, there is no need to block the upload or throw an errors.

Update last scan time after uploading files since updating right after collecting files will always cause skip (lastModified < lastScanTimestampMs) logic to fail.

How to reproduce?

  1. Configure auto-upload for the same local path with different remote destinations.
  2. Trigger auto-upload for both configurations simultaneously.
  3. One of the uploads may fail with a LOCK_FAILED error.

Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@alperozturk96 alperozturk96 force-pushed the fix/auto-upload-file-detection branch from 32927bf to cb0fba2 Compare February 10, 2026 07:47
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
@github-actions
Copy link

Codacy

SpotBugs

CategoryBaseNew
Bad practice4242
Correctness7474
Dodgy code257257
Experimental11
Internationalization77
Malicious code vulnerability22
Multithreaded correctness3434
Performance4446
Security1818
Total479481

SpotBugs increased!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant