overture-stack / rollcall

A service for managing indices and aliases in an elasticsearch cluster
GNU Affero General Public License v3.0
0 stars 1 forks source link

Releases need to be made Atomic #4

Closed joneubank closed 6 years ago

joneubank commented 6 years ago

Issuing a release to an Alias where there were no indexes matching the release ID resulted in a 500 error. Before failing, Rollcall removed indexes from the alias before checking that the new indexes to replace with exists.

Need preflight checks to pass before updating alias.

andricDu commented 6 years ago

Additionally, we need to take into account the concurrency of multiple requests in flight. We should avoid two concurrent requests making modifications at the same time.

One possible way of doing this would be to use an AtomicReference holding the last run release/removal and using synchronized either on the method doing the work or possible on the AtomicReference itself.

andricDu commented 6 years ago