cancel
Showing results for 
Search instead for 
Did you mean: 

queryChildren

ra74
Champ in-the-making
Champ in-the-making
I need to fetch all the documents - about 12000 - from the given folder. I've to be 100% sure that all documents were fetched
In the loop (it's an custom iterator in fact) the following code is called

String querySession = queryResult.getQuerySession();
queryResult = repositoryService.fetchMore(querySession);

After a few minutes I've got an error: querySession with id 'f7365d6a-6b4b-114c-84ac-1f202a5c726c' is invalid. I was able to reproduce it several times

I've read that maybe parameter system.acl.maxPermissionCheckTimeMillis can solve this problem. Temporary I've set it to 5000 to reproduce the issue again but in a few seconds and proof that this parameter was the source of the problem. But after about 200 documents queryResult.getQuerySession() returns null. No errors - really dangerous as my program deletes all the remaining documents
I've changed it again to much higher value but now I'm getting yet another sort of errors: java.net.SocketTimeoutException: Read timed out and fetchMore was not even called.

Alresco 2.1c
3 REPLIES 3

ra74
Champ in-the-making
Champ in-the-making
To summarize what I've learnt. it seems there is no reliable way to fetch all the children

cheffilet
Champ in-the-making
Champ in-the-making
You should reconsider your way of fetching 1200 Documents with a webservice. It is a requirement to fetch all 1200 document at once or could it be splitted into separat requests?

ra74
Champ in-the-making
Champ in-the-making
Yes I'm planning to do it in that way by executing several independent queries with limited results sets. But it's still not reliable. If you have a system that has to be synchronized with alfresco there's high propability that data will be deleted. I think there should be i.e. a flag in the QueryResult that timeout has occurred
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.