fix: migration commands must have consistency set to ALL
- the migration commands need to have the consistency level set to ALL - max schema agreement time is bumped up to 30 seconds Change-Id: I2940de1b81a630ea4cea305c3855ef78de9b5733
This commit is contained in:
parent
cfd1b82e19
commit
7516fbe63c
|
@ -70,7 +70,7 @@ password = cassandra_password
|
|||
# requires the datacenter option in [DEFAULT] to be configured.
|
||||
load_balance_strategy = RoundRobinPolicy
|
||||
consistency_level = ONE
|
||||
max_schema_agreement_wait = 10
|
||||
max_schema_agreement_wait = 30
|
||||
keyspace = poppy
|
||||
# Replication strategy to use for the keyspace. This value is plugged into
|
||||
# `map` as show in the syntax here: http://www.datastax.com/documentation/cql/3
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
"""Cassandra storage driver implementation."""
|
||||
|
||||
import copy
|
||||
import multiprocessing
|
||||
import os
|
||||
import ssl
|
||||
|
@ -118,7 +119,10 @@ def _connection(conf, datacenter, keyspace=None):
|
|||
except cassandra.InvalidRequest:
|
||||
_create_keyspace(session, keyspace, conf.replication_strategy)
|
||||
|
||||
_run_migrations(conf.migrations_path, session)
|
||||
migration_session = copy.copy(session)
|
||||
migration_session.default_consistency_level = \
|
||||
getattr(cassandra.ConsistencyLevel, 'ALL')
|
||||
_run_migrations(conf.migrations_path, migration_session)
|
||||
|
||||
session.row_factory = query.dict_factory
|
||||
|
||||
|
|
Loading…
Reference in New Issue