Closed infeo closed 4 years ago
Problem is that the upload task must not be triggered more than once, which needs some refactoring of this method:
The cause for this bug is, that a cached file is removed only at the very end of the close() method from the CachedFileFactory
.
Assume you have opend a CachedFile
file in the CachedFileFactory
and only one CachedFileHandle
handle refering to file, hence it is present in the files map. Now CachedFileFactory::close
with the handle id is called, then there is a short moment in time, where file does not have any handles,therefore passes the check handles.isEmpty()
and will close the file, but the cached file is still present in the factory, such that a new CachedFIleHandle refering to file can be returned.
Did some small changes, however we need a larger refactoring here, since it can still happen that a thread open
s a file which is currently being uploaded and therefore re-downloads an outdated old version.
@infeo Is this solved?
yes.
Library: WinFSP OS: Windows 10 Pro 2004
Using the
localFSProvider
of the cloud-access-java library to mirror a local directory, aClosedChannelException
is thrown if one opens an existing office document with LibreOffice 6.3.6.2. There seems no other apparent error.Sequence of actions:
Frequency: Intermittent.
Log: This is not the complete log of filesystem calls. Apart from the normal logging the
release()
method of theCloudAccessFS
and theclose()
method ofCachedFile
are logged additonally.