Skip to content

cluster manager: support dynamic add/remove#323

Merged
mattklein123 merged 4 commits intomasterfrom
cm_add_remove
Jan 6, 2017
Merged

cluster manager: support dynamic add/remove#323
mattklein123 merged 4 commits intomasterfrom
cm_add_remove

Conversation

@mattklein123
Copy link
Copy Markdown
Member

This is all of the plumbing required to support the CDS API. I will do the
actual polling API in a follow up as this change is large enough as it is
(it's also missing stats and some debug logging which I will also do in a follow
up).

What this change does:

  1. Add 2 new CM APIs which allow clusters to be added and removed at runtime.
  2. Changes the ownership logic of clusters such that primary clusters are now
    a unique_ptr and are inline destroyed on the main thread. Workers only have
    access to the backing shared ClusterInfo.
  3. Fixes DNS so that requests can be cancelled and correctly implements cancel
    in the relevant cluster destructors.
  4. Most of this change is actually a refactor so that the CM only interacts with
    the cluster interface. Otherwise testing all of the required scenarios is
    too complicated. With the refactor done it's much easier to test all of the
    different scenarios. This required generalizing a few things about how we
    were initializing SDS clusters.

A few notes about this implementation:

  1. Dynamic clusters are immediately added, without any initialize phase. This means
    that there will be a period of fetching/HC for dynamic clusters depending on the
    configuration.
  2. There are no integration tests. We should add those in the future.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants