We are relying on the MarkLogic server OptimisticLocking feature. It works via the version number in the DocumentDescriptor: when a write attempt is made via XmlDocumentManager.write(DocumentDescriptor, writeHandle) a ContentWrongVersionException is throw when the server discovered that the document did change since the last read attempt.
We are currently looking for a way to read the content of a document and its DocumentDescriptor in a single server request and discovered the following inconsitency. While
XmlDocumentManager.exists(String uri)
returns a DocumentDescriptor with the proper version number being set
XmlDocumentManager.read(String uris...)
returns a DocumentPage with DocumentRecords with DocumentDescriptors in which the version number is always -1.
Request is: Could we please also get the correct document version number when XmlDocumentManager.read(String uris...) is being used?
(We are using the marklogic-client in version 8.1.0 and the MarkLogic server in version 11.3.4)
We are relying on the MarkLogic server OptimisticLocking feature. It works via the version number in the DocumentDescriptor: when a write attempt is made via
XmlDocumentManager.write(DocumentDescriptor, writeHandle)aContentWrongVersionExceptionis throw when the server discovered that the document did change since the last read attempt.We are currently looking for a way to read the content of a document and its DocumentDescriptor in a single server request and discovered the following inconsitency. While
returns a DocumentDescriptor with the proper version number being set
returns a DocumentPage with DocumentRecords with DocumentDescriptors in which the version number is always -1.
Request is: Could we please also get the correct document version number when XmlDocumentManager.read(String uris...) is being used?
(We are using the marklogic-client in version 8.1.0 and the MarkLogic server in version 11.3.4)