DocumentsStorageProvider: prevent opening stale file contents#6917
Conversation
fix nextcloud#6883 Signed-off-by: Jens Mueller <tschenser@gmx.de>
Codecov Report
@@ Coverage Diff @@
## master #6917 +/- ##
============================================
+ Coverage 27.08% 28.42% +1.33%
+ Complexity 2313 5 -2308
============================================
Files 425 428 +3
Lines 34178 34215 +37
Branches 4729 4723 -6
============================================
+ Hits 9258 9726 +468
+ Misses 23467 23024 -443
- Partials 1453 1465 +12 |
|
Maybe I am wrong, but
|
Signed-off-by: Jens Mueller <tschenser@gmx.de>
ReadFileRemoteOperation is only used for checking if a file download is still needed, if so this codepath is taken. |
grote
left a comment
There was a problem hiding this comment.
Thanks @jmue for picking this up! I left some questions, but am not an expert on the Nextcloud bits.
Did you run the integration tests I had added? (The CI is flaky unfortunately)
Would maybe be nice to add another test to them that shows the improved behavior, aka not serving stale files anymore?
Signed-off-by: Jens Mueller <tschenser@gmx.de>
Signed-off-by: Jens Mueller <tschenser@gmx.de>
Signed-off-by: Jens Mueller <tschenser@gmx.de>
e57e61a to
a4b0e29
Compare
Signed-off-by: Jens Mueller <tschenser@gmx.de>
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/15841.apk |
Codacy722Lint
SpotBugs (new)
SpotBugs (master)
|
|
I have tested this branch (rebased on current master HEAD) with seedvault and production data. Not only did I not find any new issues (with this particular usage pattern), but also get less connection errors. |
|
@tobiasKaminsky Are there any open demands for code changes left? I don't know how I should further proceed here. From my perspective the code behavior at the reviewed sections is the same as on the master branch. Please guide me what is needed from my side here. |
|
I just overlooked it. |
DocumentsStorageProvider: prevent opening stale file contents Signed-off-by: thelittlefireman <thelittlefireman@users.noreply.github.com>

Replace SynchronizeFileOperation by ReadFileRemoteOperation to prevent opening stale file contents
fix #6883
Signed-off-by: Jens Mueller tschenser@gmx.de