Hi All, We have configured database replication in a database in which there are 3 forests and we want to write a script to make DR host same database to ready for updates in case master host is down.
As per documentation: After you fail over your applications to a Replica database, each Replica forest will likely have committed its last transaction at different timestamps. If the Replica database has multiple forests and relationships exist between those forests, this inconsistency may cause problems. In order to return the database to a transactionally consistent state, all forests must be rolled back to the minimum nonblocking timestamp. Also it says in the documentation ( https://docs.marklogic.com/guide/database-replication/dbrep_intro#id_99224) use the xdmp:forest-rollback function to roll back the forests to the minimum nonblocking-timestamp returned by the xdmp:forest-status function for each forest that is in the open or open replica state. However in the code sample below in the documentation is retrieving nonblocking-timestamp from the method xdmp:database-nonblocking-timestamp($db). xquery version "1.0-ml"; let $db := xdmp:database("Documents") let $timestamp := xdmp:database-nonblocking-timestamp($db) let $rollback := xdmp:forest-rollback( xdmp:forest-open-replica( xdmp:database-forests($db)), $timestamp) return "Roll back done" So wanted to know whether we should use xdmp:forest-status() to get minimum nonblocking-timestamp (*retrieve nonblocking-timestamp from all the forests and get the minimum timestamp from all three then rollback to that timestamp*) or xdmp:database-nonblocking-timestamp() is fine. Thank you for sharing your thoughts! Regards, Indy
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
