Take a look at xdmp:forest-open-replica().
http://docs.marklogic.com/xdmp:forest-open-replica
It's a lower overhead way to map master forest ids to failed over
replica forest ids if you're failed over.
Wayne.
On 04/16/2013 06:40 AM, Whitby, Rob wrote:
I use this function to check for failed-over forests
declare private function active-replica-forests() as xs:unsignedLong*
{
for $f in xdmp:forests()
let $status := xdmp:forest-status($f)
where
$f eq xs:unsignedLong($status/forest:master-forest) and
$f ne xs:unsignedLong($status/forest:current-master-forest)
return xs:unsignedLong($status/forest:current-master-forest)
};
On 16 Apr 2013, at 14:24, Danny Sinang <[email protected]> wrote:
Hi,
Is there a way to programmatically determine if a forest has failed over to a
replica ?
I see that xdmp:forest-status returns a current-master-forest element, but I
haven't tested it yet in a failover situation.
Perhaps someone here has actual experience with it or an alternative means.
Regards,
Danny
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
--
Wayne Feick
Principal Engineer
MarkLogic Corporation
[email protected]
Phone: +1 650 655 2378
www.marklogic.com
This e-mail and any accompanying attachments are confidential. The information
is intended solely for the use of the individual to whom it is addressed. Any
review, disclosure, copying, distribution, or use of this e-mail communication
by others is strictly prohibited. If you are not the intended recipient, please
notify us immediately by returning this message to the sender and delete all
copies. Thank you for your cooperation.
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general