| Summary: | RSEFileStoreImpl.openInputStream can use out of date cached remote file | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] Target Management | Reporter: | Alan Staves <alan.staves> | ||||
| Component: | RSE | Assignee: | dsdp.tm.rse-inbox <tm.rse-inbox> | ||||
| Status: | NEW --- | QA Contact: | Martin Oberhuber <mober.at+eclipse> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | dmcknigh, petar.petrov | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Alan Staves
This may be a result of changes for bug 291738. Due to the high frequency of fetches driven by the platform project support, remote EFS performance can suffer. To mitigate this, a means of reducing the number of queries was introduced based on a wait threshold. The threshold defaults to 1000ms but this can be fine-tuned via the "rse_efs_fetch_wait_threshold" system property. You can try this by appending a line to the eclipse.ini file like this: -Drse_efs_fetch_wait_threshold=200 Thanks David but changing that setting doesn't make any difference in my situation. In the case I'm seeing, the cached file is already several seconds old and so would already fail the threshold test and so reset the cache - but unfortunately openInputStream() doesn't call fetchInfo() so that test is never made. I have managed to implement a temporary workaround in our code which is to call fetchInfo() prior to openInputStream and that does prevent the bug. I believe the issue is that in openInputStream() the call to getRemoteFileObject() will always return the cached remote file (providing the file subsytem is still connected) - without any checking of how recent it is. The attibutes of the returned remote file are then checked with remoteFile.isDirectory() and remoteFile.isFile() - but by the time this is happening the DataElement attributes have already been set to null so it isn't recognised as being a file and it falls through and throws the exception at the bottom of the method. There are calls in openInputStream to cacheRemoteFile(null) but only inside the if (remoteFile.isFile()) rather than as the first line of the method (as is the case for mkdir() and openOuputStream()). Does this happen only when using the DSTORE_SPIRIT_ON=true option or is that not a factor in this? If you're not sure what that is, you can check the startup scripts (auth.pl and/or server.pl) to see whether it's set. Spirit mode was set to true and the cached remote file object returned was set to spirit (I'll attach an image I took of the variables view during one of my debug sessions). I've just been trying to reproduce this problem with spirit mode set to false but I am currently unable to reproduce it at all (with spirit mode set to true or false). Unfortunately the problem is intermittent and the case I had which was failing 90% of the time is now working ok. Created attachment 209695 [details]
Image showing the state of the cached remote file about to be used by openInputStream
I suspect that this is an issue with spirit mode but, if you are ever able to reproduce the problem with spirit mode off, that theory could be ruled out. |