Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 462608

Summary: [server] Meta File Error, cannot read workspace JSON file error
Product: [ECD] Orion Reporter: Anthony Hunter <ahunter.eclipse>
Component: ServerAssignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 9.0   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Anthony Hunter CLA 2015-03-19 16:29:20 EDT
I have a server with an error thrown for an issue during a user's asynchronous project creation.

ERROR org.eclipse.orion.server.config - Meta File Error, cannot read JSON file /optnew/workspaces/serverworkspace/zz/zzuser/zzuser-OrionContent.json from disk, reason: A JSONObject text must begin with '{' at character 0

The access logs show:
[17/Mar/2015:09:18:51 -0500] "GET /code/workspace/zzuser-OrionContent HTTP/1.1" 200 1590
[17/Mar/2015:09:18:51 -0500] "GET /code/workspace/zzuser-OrionContent HTTP/1.1" 500 128
[17/Mar/2015:09:18:51 -0500] "GET /code/workspace/zzuser-OrionContent HTTP/1.1" 200 1704

The first GET receives the workspace without the new project added and the third GET receives the workspace with the new project added.

The second GET receives an internal server error 500 because of the error when the workspace json is being written in another thread.

Even though the triple workspace request is flawed, we should never have an error 500, the workspace json is supposed to be locked for reads as it is being written.
Comment 1 Anthony Hunter CLA 2015-03-19 17:11:03 EDT
This is fixed with commit:
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=b617d27b8bb73fa9ea0854daca1258d5ba96b928

I also deliver new JUnit tests in SimpleMetaStoreWorkspacePropertyConcurrencyTests that could show the error was occurring before the update to SimpleMetaStore.