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

Moving/renaming huge folder from web UI timeout causing huge oc_filecache inconsistency #25569

Closed
PVince81 opened this issue Jul 22, 2016 · 7 comments

Comments

@PVince81
Copy link
Contributor

PVince81 commented Jul 22, 2016

Steps

  1. Check out v9.0.4
  2. Create a folder "test"
  3. Put some files and subfolders in it
  4. Hack the code to simulate a PHP timeout/death: add die(); in View::move() before the cache update: https://github.com/owncloud/core/blob/v9.0.4/lib/private/files/view.php#L321
  5. Rename "test" to "test2"
  6. Check data folder
  7. Check oc_filecache
  8. Refresh the page

Expected result

Have a way to cancel or detect the timeout and have no inconsistency between data folder and oc_filecache.

Actual result

Data folder says "test2" but oc_filecache is still on "test".
Run occ files:scan --all to fix it.

It becomes worse if "test" or "test/sub" was shared with another user.
Whenever that user accessed or writes to the folder, it creates a copy of "test" and leaves "test2" invisible.

Versions

Observed in v9.0.4, likely to happen in any other version.

Some ideas: maybe we need a "oc_transactions" table of some sort where every file transaction adds a row there then deletes it after its done. Or reuse "oc_file_locks" for that purpose with a PHP request id as well. Goal is to detect whenever a PHP process died and left a stray transaction and give OC a chance to either finish it or roll it back, like renaming the folder back.

Open to discussion...

@DeepDiver1975 @butonic @georgehrke @VicDeo @owncloud/filesystem

@PVince81
Copy link
Contributor Author

PVince81 commented Oct 6, 2016

another reason to look into #24509

@PVince81
Copy link
Contributor Author

In most cases a rename is a quick operation but if the database has too many entries to update it might take longer.

@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.

@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@moritzha
Copy link

We're also having issues with user-based encryption after moving huge folders.
Errorlog shows the typical Bad Signature.
"message":"Exception: {"Message":"Bad Signature\[...]"

Could be same issue, but different symptoms.

It can be solved by deleting and reuploading the content to regen the keys by a different user.

@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@PVince81 PVince81 reopened this Mar 9, 2018
@felixboehm felixboehm removed this from the triage milestone Apr 9, 2018
@lock
Copy link

lock bot commented Jul 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants