Unclosed/Obsolete Stands
16 March 2022 03:38 PM
|
|
Summary Obsolete stands (also referred to as "unclosed-stands") occur during the normal operation of MarkLogic Server. Stands in a forest are marked as obsolete so that MarkLogic Server can recover the forest from an unexpected outage. There are many reasons a stand can be marked as obsolete:
NOTE: An obsolete stand will not be deleted as long as there is any query or transaction running that has a handle to a node within that stand. This means that we should avoid server fields that store any kind of database node in the value parameter. If you must store document nodes in a server field, then the server-field backup documents should either reside in a separate database, or you should use xdmp:quote() to store a string representation of the node into the server-field, and then use xdmp:unquote() to turn the value back into a node when you are ready to use it. Be sure to add some error handling around the xdmp:unquote() in case the base-uri for that node no longer exists. Forest Startup When a forest is enabled, any stand in the forest that is marked as obsolete will be deleted. Obsolete stands should only exist at startup in the situation where the stand is disabled unexpectedly. This may occur:
A forest can be started by:
Detecting Obsolete Stands The files that make up a stand reside under a directory on the file system. The directory for a stand that has been marked as obsolete contains a file with the name Additionally, a forest's status will indicate that when “unclosed-stand” exists for that forest. xdmp:forest-status() will include an 'unclosed-stand' element that gives an indication of the query reference timelines. The results will include an element that looks something like:
| |
|