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

[WinVFS] Opened files in virtual files system does not save when still open #9829

Closed
2 tasks done
TheOneRing opened this issue Jun 29, 2022 · 19 comments · Fixed by #10411
Closed
2 tasks done

[WinVFS] Opened files in virtual files system does not save when still open #9829

TheOneRing opened this issue Jun 29, 2022 · 19 comments · Fixed by #10411
Assignees
Labels
blue-ticket Early-Adopter:CERN Epic p2-high Escalation, on top of current planning, release blocker Windows

Comments

@TheOneRing
Copy link
Contributor

Pre-submission Checks

  • I checked for similar issues, but could not find any. I also checked the closed issues. I could not contribute additional information to any existing issue.
  • I will take the time to fill in all the required fields. I know that the bug report may be dismissed otherwise due to lack of information.

Feature description

On Windows when using VFS don't upload files while they are locked.
This is due to the fact that we can't update the placeholder while it is locked and therefor the db and the vfs state can run out of sync.

Proposed solution

Upload the file anyhow, without updating the db or the placeholder.
This will result in one additional upload once the file is closed but it should restore the upload of auto saves.

Alternative solutions you considered

No response

Additional context

No response

@TheOneRing TheOneRing added this to the 4.0 milestone Jun 29, 2022
@TheOneRing TheOneRing added the p3-medium Normal priority label Jun 29, 2022
@TheOneRing
Copy link
Contributor Author

Update: We can't upload the file without out updating the db as the client would then detect a clash.
We probably need to decouple the placeholder update from the update in the db.

New flow:

  • Try update the placeholder
  • Update the db, mark the placeholder as dirty if its update failed
  • Try to update dirty placeholders ever X seconds

@labkode
Copy link
Member

labkode commented Jul 21, 2022

@TheOneRing can you port this bugfix as well to 2.10 branch?

@TheOneRing
Copy link
Contributor Author

No if it would be a simple fix I would directly implement on top of 2.10.
It is not.
Therfore it will be implemented in 4.0.

@stabledave
Copy link

you sure it's only a problem when using ownclouds vfs implementation?
I'm on full sync and experience the same behaviour as #9428. The problem should only occur when using vfs, shouldn't it?

I did some testing with an older version (2.8.1.4157)

2.8.1 with vfs enabled:
MS: files saved but still open: error while writing meta data (different error)
Non-MS: files saved but still open: works fine no error

2.8.1 with vfs disabled:
MS: files saved but still open: will upload without error (desired behaviour)
Non-MS: same

current with vfs enabled
MS: file saved but still open: file is currently in use
Non-MS: files saved but still open: works fine no error

current with vfs disabled
same

Appearently office applications have an unique way to handle files (I've seen similar reports from onedrive users). Possible that current behaviour with full sync is the consequence of merging implementation to fix a different vfs problem?

@TheOneRing
Copy link
Contributor Author

It has nothing to do with office, but with how we handle locked files.

@stabledave
Copy link

stabledave commented Aug 9, 2022

office aside (that was not my point), the problem also occurs with full sync, so the title is misleading. (I didn't understand and still don't why issue contains vfs (suggesting it only occurs with vfs) when neither of the previous bug reports use vfs). Appearently 'how we handle locked files' changed in >=2.8.1 to fix a vfs problem (meta data error?) and that fix creates the 'file is currenly in use' problem on the full sync side which it shouldn't (it worked before).

I'll track down the latest client version before that implementation and for the time being stay on that. Our environment went mental because sync was a mess. Users usually save files and don't exit the application but go to hibernation. Closing software has different drawbacks when using really big files.

nota bene: nextcloud current (we use both) gives 'file currently in use' when using vfs but no error when using full sync (desired behaviour).

@glpatcern
Copy link

I confirm what @stabledave reported: the issue with syncing locked files appears in version 2.9.2 also with plain non-VFS-enabled sync pairs.

As a matter of fact, I never realized it despite running 2.9.x for months, simply because the "sync issues" are all grouped together, including permanent issues (e.g. files in the ignore list or symlinks) that I regularly ignore (and I have now customized the filter to hide such cases, so that real issues do trigger my attention ;-) )

@stabledave
Copy link

tested 2.9.2, 2.9.1, 2.9.0, they all have the 'file currently in use' problem.
2.8.2 seems fine (we use that for now)
@glpatcern did you test 2.9.1?

@glpatcern
Copy link

I used 2.9.1 in the past, but can't confirm for sure this issue. Otherwise, I can confirm that 2.10.1 is also affected.

TheOneRing added a commit that referenced this issue Jan 18, 2023
TheOneRing added a commit that referenced this issue Jan 18, 2023
TheOneRing added a commit that referenced this issue Jan 18, 2023
TheOneRing added a commit that referenced this issue Jan 18, 2023
TheOneRing added a commit that referenced this issue Jan 19, 2023
TheOneRing added a commit that referenced this issue Jan 19, 2023
TheOneRing added a commit that referenced this issue Jan 19, 2023
TheOneRing added a commit that referenced this issue Jan 19, 2023
TheOneRing added a commit that referenced this issue Jan 26, 2023
TheOneRing added a commit that referenced this issue Jan 27, 2023
TheOneRing added a commit that referenced this issue Feb 3, 2023
@misunkim
Copy link

misunkim commented Mar 6, 2023

I am using the latest version(3.2.0) and experience the same problem that the files are not synching if it is open in Microsoft Office product. Is this problem still not fixed?

@michaelstingl
Copy link
Contributor

Fixed, but not released yet. You can test drive in the 4.0 pre-release builds:

You can install the testpilotcloud builds, to not mess-up with your production-ownCloud client:

@misunkim
Copy link

misunkim commented Mar 6, 2023

Thanks for the info! May I ask when this 4.0 version will be released, approximately? To be on the safe side, I may just wait for the stable version, if it's coming in the near future.

@michaelstingl
Copy link
Contributor

May I ask when this 4.0 version will be released, approximately?

No ETA yet. Here you can find the open issues for 4.0:

@misunkim
Copy link

misunkim commented Mar 6, 2023

thanks.

@HanaGemela HanaGemela self-assigned this Mar 13, 2023
@HanaGemela HanaGemela removed their assignment Mar 27, 2023
@michaelstingl michaelstingl changed the title Opened files in virtual files system does not save when still open [WinVFS] Opened files in virtual files system does not save when still open Mar 28, 2023
@michaelstingl
Copy link
Contributor

Please Test:

  • Notepad++
  • LibreOffice
  • Microsoft Office 2019/2021

@Salipa-Gurung
Copy link
Contributor

In version 4.0.0.10560-daily20230403

vfs enabled vfs disabled
Notepad++ file synced when file is saved and application still open ✔️ file synced when file is saved and application still open ✔️
LibreOffice writer file synced when file is saved and application still open ✔️ file synced when file is saved and application still open ✔️

@HanaGemela
Copy link
Contributor

@jnweiger will help with Microsoft Office 2019/2021

@jnweiger
Copy link
Contributor

jnweiger commented Apr 20, 2023

@michaelstingl
Is this supposed to fix for #8316 ? If so, I can use the reproducer steps there.
Is testing against ownCloud-4.0.0.10639-beta1.x64.GPO.msi correct?

@jnweiger
Copy link
Contributor

Confirmed fixed in 4.0.0-beta.2
Windows office save (and keep open) causes the client to sync the file to the server. OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blue-ticket Early-Adopter:CERN Epic p2-high Escalation, on top of current planning, release blocker Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants