sky-uk / cqlmigrate

Cassandra schema migration library
BSD 3-Clause "New" or "Revised" License
47 stars 29 forks source link

Fail gracefully if lock cannot be obtained #90

Closed davidh87 closed 4 years ago

davidh87 commented 4 years ago

Perform a read on the locks before attempting to write one. Should make some failure cases around consistency more gracefully retryable. Addresses https://github.com/sky-uk/cqlmigrate/issues/87

adamdougal commented 4 years ago

@davidh87 do you mind resolving the conflicts?

davidh87 commented 4 years ago

I've force-pushed to the branch and fixed the merge issues.

I noticed that the ability to use different keyspaces isn't tested too well (the test always assumes it's equal to 'cqlmigrate' - functionally seems to work though) - it's a not-insignificant refactor to the tests to support this, so was gonna raise an issue rather than tackle it as part of this PR - sound ok?