[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [orion-dev] Orion File Client - Getting file contents and metadata in a single request
|
Hi Brian,
For the file api the direction we're heading is towards closer alignment with a posix style api.
What this means is that there is a logical separation between getting the content (read) and getting the metadata (lstat). So, there is a possibility for a race condition in the same way there is the possibility for a race condition between doing a readdir and a read.
To address these sorts of situations there are two things that we still need to work on (e.g. we could use help here if its important to you):
1) Error codes -- would like to use the posix codes instead of our current mix of codes and user displayable messages
2) Exposing either a limited form of locking or conditional calls -- less sure about this one
-Simon
Brian W Svihovec ---01/28/2014 08:18:07 AM---It looks like the Orion Server supports requests for both file contents and metadata in a single re
![]()
| ![]()
Brian W Svihovec <svihovec@xxxxxxxxxx> |
![]()
| ![]()
orion-dev@xxxxxxxxxxx, |
![]()
| ![]()
01/28/2014 08:18 AM |
![]()
| ![]()
[orion-dev] Orion File Client - Getting file contents and metadata in a single request |
![]()
| ![]()
orion-dev-bounces@xxxxxxxxxxx |
It looks like the Orion Server supports requests for both file contents and metadata in a single request (http://wiki.eclipse.org/Orion/Server_API/File_API#Getting_file_metadata_and_contents), but it does not look like the read function of the file client supports this functionality (http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/tree/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js).
I am wondering if there is a potential race condition that can occur between a request for the file contents and its metadata in the client. For example, consider the following:
1) A user requests a file and the contents are returned to the browser
2) Another user saves the file, updating the contents and ETtag value
3) The updated ETag value is returned to the user in #1
4) When the user in #1 saves the file, they have a valid ETag, but their original file contents no longer match the version that was used to generate the ETag
Is there an API in the file client that can return both the file contents and metadata in a single request, or is it not possible for this race condition to occur?
Thanks,
Brian_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev

