Maintain zookeeper lock during the whole database initialization
To ensure cassandra schema consistency, zookeeper lock is
used so that only one collector node is creating schema at
any given point of time. However if the creation of schema
fails then we were releasing the zookeeper lock and retrying.
This resulted in a situation where from cassandra perspective
schema was created concurrently and caused column family ID
mismatch. So now we will only release the zookeeper lock when
the schema creation is successful.
Reviewed: https:/ /review. opencontrail. org/38653 github. com/Juniper/ contrail- controller/ commit/ dbed80635acc489 ddf1f0b0ae2597d 62bd24074e
Committed: http://
Submitter: Zuul (<email address hidden>)
Branch: R4.0
commit dbed80635acc489 ddf1f0b0ae2597d 62bd24074e
Author: Megh Bhatt <email address hidden>
Date: Fri Sep 29 15:04:04 2017 -0700
Maintain zookeeper lock during the whole database initialization
To ensure cassandra schema consistency, zookeeper lock is
used so that only one collector node is creating schema at
any given point of time. However if the creation of schema
fails then we were releasing the zookeeper lock and retrying.
This resulted in a situation where from cassandra perspective
schema was created concurrently and caused column family ID
mismatch. So now we will only release the zookeeper lock when
the schema creation is successful.
Change-Id: I887db5a5ca4d2c 8b40b5c50079ed0 05c3f4f4b4c
Partial-Bug: #1721416