Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
Cassandra max wait for schema agreement option
Browse files Browse the repository at this point in the history
Change-Id: Iaee63632620666330c3f1b7f6b9a86cbf45b3ac7
  • Loading branch information
tonytan4ever committed Jan 20, 2015
1 parent 695bda3 commit 713c8a9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions etc/poppy.conf
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,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
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
Expand Down
6 changes: 5 additions & 1 deletion poppy/storage/cassandra/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
help='Load balancing strategy for connecting to cluster nodes'),
cfg.StrOpt('consistency_level', default='ONE',
help='Consistency level of your cassandra query'),
cfg.IntOpt('max_schema_agreement_wait', default=10,
help='The maximum duration (in seconds) that the driver will'
' wait for schema agreement across the cluster.'),
cfg.StrOpt('keyspace', default='poppy',
help='Keyspace for all queries made in session'),
cfg.DictOpt(
Expand Down Expand Up @@ -97,7 +100,8 @@ def _connection(conf, datacenter, keyspace=None):
auth_provider=auth_provider,
load_balancing_policy=load_balancing_policy,
port=conf.port,
ssl_options=ssl_options
ssl_options=ssl_options,
max_schema_agreement_wait=conf.max_schema_agreement_wait
)

session = cluster_connection.connect()
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/storage/cassandra/test_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
help='Load balancing strategy for connecting to cluster nodes'),
cfg.StrOpt('consistency_level', default='ONE',
help='Consistency level of your cassandra query'),
cfg.IntOpt('max_schema_agreement_wait', default=10,
help='The maximum duration (in seconds) that the driver will'
' wait for schema agreement across the cluster.'),
cfg.DictOpt(
'replication_strategy',
default={
Expand Down

0 comments on commit 713c8a9

Please sign in to comment.