@@ -10,6 +10,9 @@ Bug Fixes
|
||||
---------
|
||||
* Don't strip trailing underscores from column names when using the
|
||||
named_tuple_factory (PYTHON-56)
|
||||
* Pass WriteType instance to RetryPolicy.on_write_timeout() instead
|
||||
of the string name of the write type. This caused write timeout
|
||||
errors to always be rethrown instead of retrying. (github #123)
|
||||
|
||||
1.1.2
|
||||
=====
|
||||
|
@@ -43,6 +43,7 @@ from cassandra.cqltypes import (AsciiType, BytesType, BooleanType,
|
||||
InetAddressType, IntegerType, ListType,
|
||||
LongType, MapType, SetType, TimeUUIDType,
|
||||
UTF8Type, UUIDType, lookup_casstype)
|
||||
from cassandra.policies import WriteType
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -291,7 +292,7 @@ class WriteTimeoutErrorMessage(RequestExecutionException):
|
||||
'consistency': read_consistency_level(f),
|
||||
'received_responses': read_int(f),
|
||||
'required_responses': read_int(f),
|
||||
'write_type': read_string(f),
|
||||
'write_type': WriteType.name_to_value[read_string(f)],
|
||||
}
|
||||
|
||||
def to_exception(self):
|
||||
|
@@ -568,6 +568,14 @@ class WriteType(object):
|
||||
internally before a BATCH write.
|
||||
"""
|
||||
|
||||
WriteType.name_to_value = {
|
||||
'SIMPLE': WriteType.SIMPLE,
|
||||
'BATCH': WriteType.BATCH,
|
||||
'UNLOGGED_BATCH': WriteType.UNLOGGED_BATCH,
|
||||
'COUNTER': WriteType.COUNTER,
|
||||
'BATCH_LOG': WriteType.BATCH_LOG,
|
||||
}
|
||||
|
||||
|
||||
class RetryPolicy(object):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user