cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS update delay

lukas
Champ in-the-making
Champ in-the-making
Hi
I have build java cmis client which creates a lot of folders through CMIS. (root_folder.createFolder(props))
After the folders were created, the java client copies some files to these folders.
Unfortunately i get always an error that these folders do not exists.
So I tried to query with the CMIS- Workbench SELECT * FROM em:eventfolder where em:eventfoldereventid=1234 during the script were generating these folders.
It seems that it takes up to some seconds until the folders are available for cmis-query.

Now i have set a 5 second delay between folder creation and file creation and it works.
But what will happen, if the server is under heavy load, than it might take more than 5 seconds…

Is there any way to ensure that all folder-creation cmis tasks are completed, before i resume with the file copy task?

Thank a lot for your help

Lukas

2 REPLIES 2

kaynezhang
World-Class Innovator
World-Class Innovator
Generally creating a folder shouldn't take that long.
Maybe your system don't have enough system resources (memory/CPU/network,especially JVM). I think you should check system resources first instead of solving it by finding an api to  ensure folder-creation completion

lukas
Champ in-the-making
Champ in-the-making
I have read that it could takes some time for indexing the new metadata.
The script is for a data migration, so finally the script must be able to add about 1000 folders.
I also plan to parallelize some procedures with 2-4 threads.
System resources should not be a problem, but i will test it on a second machine.


I surrounded the CMIS Folder query with a loop including a small timeout and limited tries.
Now the script can detect when the Folder is available Smiley Happy

Thanks for your help!