java-client-api
java-client-api copied to clipboard
DMSDK has troubles with tiered storage offline
Version of MarkLogic Java Client API
5.5.3
Version of MarkLogic Server
10.0-9.1
Java version
java version "1.8.0_51" Java(TM) SE Runtime Environment (build 1.8.0_51-b16) Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
OS and version
ProductName: macOS ProductVersion: 11.6.5 BuildVersion: 20G527
Input: Some code to illustrate the problem, preferably in a state that can be independently reproduced on our end
See attached App.java in zip
Actual output: What did you observe? What errors did you see? Can you attach the logs? (Java logs, MarkLogic logs)
This works OK and lists the URIs.
If you take a partition offline as
import module namespace ts="http://marklogic.com/xdmp/tieredstorage" at "/MarkLogic/tieredstorage.xqy"; ts:partition-set-availability(xdmp:database("tiered"),"cold", "online")
Then you get errors as
com.marklogic.client.FailedRequestException: Local message: failed to apply resource at internal/uris: Internal Server Error. Server Message: XDMP-FORESTNID: cts:uris((), ("score-zero", "item-order", "ascending", ...), cts:registered-query(10940043425799836531, ("unfiltered"), 1), xs:double("0"), xs:unsignedLong("6710248215865000275")) -- Specified forest 6710248215865000275 not in database at com.marklogic.client.impl.OkHttpServices.checkStatus(OkHttpServices.java:4474) at com.marklogic.client.impl.OkHttpServices.postResource(OkHttpServices.java:3463) at com.marklogic.client.impl.OkHttpServices.postResource(OkHttpServices.java:3407) at com.marklogic.client.impl.OkHttpServices.postResource(OkHttpServices.java:3398) at com.marklogic.client.impl.OkHttpServices.processQuery(OkHttpServices.java:3155) at com.marklogic.client.impl.OkHttpServices.uris(OkHttpServices.java:3055) at com.marklogic.client.impl.QueryManagerImpl.uris(QueryManagerImpl.java:169) at com.marklogic.client.datamovement.impl.QueryBatcherImpl$QueryTask.run(QueryBatcherImpl.java:738) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Threa Archive.zip d.java:745) Archive.zip
and the task never completes
Expected output: What specifically did you expect to happen?
It would be nice if offline forests were skipped, or at least the process would complete and you could ignore the errors for the offline forests.
Alternatives: What else have you tried, actual/expected?
See attached App2.java in zip, with a try at filtering the forests out by name.
This does seem to filter out the named forests, so there are no errors, but it still hangs.
Zip file is at Archive.zip
It hangs even if you manually filter out the forests. Is this not a bug?
Hi @chamlin . Thank you for sharing App2.java file.! We were able to recreate the exception. I am working on it.
Hi @chamlin , the fix is now part of the "develop" branch. The App2.java is working as expected. It will helpful if you can confirm if it works on your end. Thanks.!
Yes, it looks like if you know the forests and pass them in to the proxy, it ignores those forests and doesn't hang.
Is there a planned release that would include this fix? Thanks.
@chamlin @anu3990 I believe that since this is on the develop branch, it will be in the 5.6.0 release that will coincide with ML 11.
@chamlin @anu3990 Closing this as based on the PR, it's been resolved.
@chamlin If this turns out not to be the case, please open a bug in our internal JIRA in the Java project.