Skip to content
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

Dubious overwrite logic with etag / server side conflict handling #3262

Closed
PVince81 opened this issue Mar 25, 2020 · 5 comments
Closed

Dubious overwrite logic with etag / server side conflict handling #3262

PVince81 opened this issue Mar 25, 2020 · 5 comments
Assignees
Labels
feature:files Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug Something isn't working

Comments

@PVince81
Copy link
Contributor

See these:

apps/files/src/mixins.js|207 col 61| this.$_ocUpload(file, item.fullPath, exists.etag)
apps/files/src/mixins.js|237 col 59| this.$_ocUpload(files[i], files[i].name, exists.etag)

it seems to be passing in an etag but the method $_ocUpload takes an overwrite boolean as parameter.

It is likely that folder upload is not properly processing overwrites, unless it just works "by chance".

@LukasHirt FYI

@PVince81 PVince81 added Type:Technical-Debt Type:Bug Something isn't working and removed Type:Technical-Debt labels Mar 25, 2020
@PVince81
Copy link
Contributor Author

Compared to OC 10, it also seems that the logic is not relying on the 412 or 409 error codes on upload to trigger the overwrite dialog.

I'll tag this as bug now, we need to revise the way how we detect conflicts and manage concurrency.

Here's an example case that is not handled properly:

  1. Create a folder "conflict"
  2. Open the folder
  3. Open another browser tab and navigate into the folder "conflict" there as well
  4. In the first browser tab, upload a file "test.txt"
  5. In the second browser tab, upload the same file "test.txt"

Expected result

Conflict dialog "do you want to overwrite ?", then confirming would attempt the upload again.

Actual result

image

@PVince81 PVince81 changed the title Dubious overwrite logic with etag Dubious overwrite logic with etag / server side conflict handling Apr 23, 2020
@kulmann kulmann added Priority:p2-high Escalation, on top of current planning, release blocker and removed Priority:p3-medium Normal priority labels Dec 3, 2021
@tbsbdr
Copy link

tbsbdr commented Jun 28, 2022

needs to be checked with uptodate ocis and oc10 backends.

@JammingBen
Copy link
Contributor

Current behavior for both backend is that the second tab will overwrite the uploaded file without showing any kind of conflict dialog. I guess the expected behavior is that this dialog shows though, right @kulmann @tbsbdr ?

@tbsbdr
Copy link

tbsbdr commented Aug 1, 2022

👍 correct

@tbsbdr
Copy link

tbsbdr commented Sep 21, 2022

current behaviour is:

closing as current behaviour is good enough - avoids dataloss 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:files Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug Something isn't working
Projects
No open projects
Status: Done
4 participants