Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[orion-dev] Orion File Client - Getting file contents and metadata in a single request

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

Back to the top