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