marklogic / marklogic/java-client-api

Feature request: XmlDocumentManager.write() returns an updated DocumentDescriptor

Open
#1,939 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
61
Forks
74
Avg merge
2d 53m
Merged PRs (30d)
8

Description

We would like to use the optimistic read feature on XmlDocumentManager.read(DocumentDescriptor desc, String uri). To use it effiently we would store the latest DocumentDescriptor and document in memory on our client side, thus when XmlDocumentManager.read(DocumentDescriptor descr, String uri) returns null - signalling that the content on the server has not changed in between - we know that our descriptor and document in memory is up to date.

Request: to close the loop we would need to enhance the XmlDocumentManager's write method to return the updated DocumentDescriptor (with the updated document version number inside) like this:

DocumentDescriptor write(DocumentDescriptor desc, WriteHandle handle);

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at XmlDocumentManager.write(DocumentDescriptor desc, WriteHandle handle) and inspect its interface, implementations, and existing tests. Update the API so the write operation returns the updated DocumentDescriptor containing the new document version, then verify the affected write behavior and callers.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.