Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DMSDK has troubles with tiered storage offline #1345

Closed
chamlin opened this issue May 10, 2022 · 8 comments
Closed

DMSDK has troubles with tiered storage offline #1345

chamlin opened this issue May 10, 2022 · 8 comments
Assignees

Comments

@chamlin
Copy link

chamlin commented May 10, 2022

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.

@chamlin
Copy link
Author

chamlin commented May 10, 2022

Zip file is at Archive.zip

@chamlin
Copy link
Author

chamlin commented Jun 3, 2022

It hangs even if you manually filter out the forests. Is this not a bug?

@anu3990 anu3990 assigned anu3990 and unassigned llinggit Jun 3, 2022
@anu3990
Copy link
Contributor

anu3990 commented Jun 3, 2022

Hi @chamlin . Thank you for sharing App2.java file.! We were able to recreate the exception. I am working on it.

@anu3990
Copy link
Contributor

anu3990 commented Jun 14, 2022

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.!

@anu3990 anu3990 added test and removed new labels Jun 14, 2022
@chamlin
Copy link
Author

chamlin commented Jun 24, 2022

Yes, it looks like if you know the forests and pass them in to the proxy, it ignores those forests and doesn't hang.

@anu3990 anu3990 added this to the java-client-api-NEXT milestone Jun 24, 2022
@chamlin
Copy link
Author

chamlin commented Sep 14, 2022

Is there a planned release that would include this fix? Thanks.

@rjrudin
Copy link
Contributor

rjrudin commented Sep 14, 2022

@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.

@rjrudin
Copy link
Contributor

rjrudin commented Nov 17, 2022

@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.

@rjrudin rjrudin closed this as completed Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants