How do I know if Sync Gateway has successfully opened a database after _resync?

I am trying to run a resync operation on a setup which uses multiple sync gateways using some instructions described here: https://docs.couchbase.com/sync-gateway/current/learn/defining-sync-functions.html#changing-the-sync-function.

Here are the steps I’m taking:

  1. Update sync function config on all instances of sync gateway
  2. Restart all instances of sync gateway
  3. Call /bucket/_offline on all instances of sync gateway
  4. Run the /bucket/_resync on a single instance of sync gateway

I am stuck at this point.

At the end of that link it states: “After the configuration is updated, one instance should be brought up so it can update the database—​if more than one is running at this time, they’ll conflict with each other. After the first instance finishes opening the database, the others can be started.”

How do I know when the first instance of sync gateway has finished opening the database? Is this after a successful call to the _resync endpoint? Or is it after a successful call to the _online endpoint on a single instance of sync gateway?

Agree that the statement in document as worded is a bit confusing. What is meant is that when the call to _resync returns with a success, you can be sure that the sync gateway has finished resyncing all the data in the bucket and you bring the database back online using online call. The you can the remaining sync gateways in the cluster (or bringing it offline/online)

The you can the remaining sync gateways in the cluster (or bringing it offline/online)

Just to clarify this means: after the _resync succeeds one on sync gateway and I bring the database online, I can call _online on the other instances of sync gateway. In particular, I don’t need to call _resync on the other instances.

Yes- don’t need to call resync on the other sync gateways.