-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: API call to trigger pindex -> node reassignment? #22
Comments
If you want a sync-gateway taken out of the cluster, then you have to get that node unlisted or unregistered from the Cfg. Then the planner will automatically wake up and reassign the PIndexes across remaining nodes. For example, to do this kind of thing in cbft's case, that's done by stopping cbft, and running it again with the "-register=unknown" cmd-line flag. See cbft's docs here: http://labs.couchbase.com/cbft/admin-guide/clustering/#removing-cbft-nodes Underneath the hood, that "-register=unknown" command-line flag eventually leads to codepath that invokes cbgt.Manager.RemoveNodeDef(), like here... https://github.com/couchbaselabs/cbgt/blob/master/manager.go#L214 And, then, the planner (which is subscribing to Cfg changes) will awake and automatically do the PIndex->node reassignment & re-planning. |
One more thing, if you think for example for whatever reason the planner needs a "force wake up" or a kick in the head to do some re-planning, then you can invoke...
And, if you're also using cbgt's REST endpoints, then that's also available via REST -- search for the "/api/managerKick" API here...
|
Supposing we added a Sync Gateway endpoint on the admin API (port 4985, superuser mode), which told this Sync Gateway instance to remove itself, would we just call |
Slight correction, you'd probably us "unknown", like... cbgtManger.StartRegister("unknown") In hindsight, the StartRegister() method is something I wish I had instead renamed to just plain old Register(). |
Yeah, I agree, |
Yep, good idea. Will make that StartRegister->Register the plan. |
On the StartRegister deprecation & rename to Register, see commit: 74c80d |
A few more questions on this topic:
|
Going to pull that out as a new, separate issue: #26
Similarly, gonna point to brand new issue 27 to capture that scenario... #27 |
Is there an API call to do this?
In our case, if one Sync Gateway was taken offline.
The text was updated successfully, but these errors were encountered: