[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[geclipse-dev] AW: [Bug 228185] BufferOverflowException during opening output file for files from gLite sandbox
|
Hi All,
Since Bugzilla is currently down and this is urgent I post my reply
here. I will post this response to Bugzilla as soon as it is up again.
Cheers, Mathias
> 1. Create new file (or open a file).
> 2. Add some contents, save changes and close the file.
> 3. Reopen file.
I see!
> Reason: fileInfo element of the file store is not refreshed with the
current
> size of the file. Allocated buffer of the CachedInputStream is smaller
than the
> actual contents of the file.
Well, this is a problem of the EFS definition and our implementations.
fetchInfo() actually should always contact the underlying filesystem and
should not cache things. Nevertheless, since the EFS resource
integration is so bad and therefore fetchInfo is called all the time
(e.g. from within context menu activations or decorators or whatever)
for remote filesystems we have no other chance than to cache things.
> 1. User A modifies file F. Saves the changes, correct file size is
fetched.
> 2. User B modifies file F.
> 3. User A opens file F. He will get BufferOverflowException.
What you describe here is a synchronization problem that you will ALWAYS
have when dealing with remote file systems. You cannot prevent this. So
we will make no attempts to solve this case.
> We think that somehow CachedInputStream should be changed to prevent
this
> situation, allocating bigger buffer or asking file store to fetch the
current
> fileInfo from the server.
Allocating a bigger buffer is nonsense as I think. How big should the
buffer be? Twice as big as needed? Forget about it, no way.
I would really love to implement you solution 2. Nevertheless talking
about EFS there is no way to tell the implementations to REALLY fetch
the file info and to not return the buffered one. Nevertheless, here the
gecl filesystem comes in. This exactly was developed to cache things
centrally instead of doing things spread all over the place. So we can
have a try with modifying the GEclipseFileStore. Nevertheless I would
not recommend to do this for this release now since this is a major
issue and I would not risk to mess everything up here.