Skip to content
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

Manual trigger of sync #138

Open
pbetkier opened this issue Nov 14, 2016 · 1 comment
Open

Manual trigger of sync #138

pbetkier opened this issue Nov 14, 2016 · 1 comment

Comments

@pbetkier
Copy link
Contributor

Expose endpoint for triggering sync. Operator should be able to execute sync manually when he notices differences between Marathon and Consul states to resolve the issue faster.

Differences may occur e.g. when marathon-consul doesn't receive events from Marathon.

Things to consider:

  • usability: when running multiple instances of marathon-consul as a cluster how to know which instance to call? Currently sync may be executed on the leader only.
  • safety: would it be safe if manual sync and scheduled sync were running simultaneously? If not, how to introduce mutual exclusion?
@janisz
Copy link
Contributor

janisz commented Nov 14, 2016

  1. We can add force parameter. Without force endpoint will perform sync only if configuration allows syncs (sync is enabled and shouldPerformSync() returns true). This will complicate the code so I prefer to always perform syncing on manual trigger.
  2. We can introduce channel that will trigger sync in same way as Ticker do it now. Endpoint will pass message on this channel that will perform sync. This should prevent concurrent syncing but will not solve Synchro vs events processing race / synchro cache invalidation #88 so will only increase entropy.

I think we should make it as simple as possible. This is maintenance feature to recover after outage (e..g., Marathon stops sending events and we need quickly refresh state). Same effect could be achieved by starting marathon-consul with forced sync enabled on local machine.

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

No branches or pull requests

2 participants