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/36134 github. com/Juniper/ contrail- controller/ commit/ 24fb66226309c47 68134485227ccf1 3eb04c20e2
Committed: http://
Submitter: Zuul (<email address hidden>)
Branch: master
commit 24fb66226309c47 68134485227ccf1 3eb04c20e2
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: I1af4ef147ec31d 44bce258b5af319 589e27eb64e
Closes-Bug: #1719830