Merge branch 'cassandra-3.0' into cassandra-3.11

This commit is contained in:
Stefania Alborghetti 2017-01-06 10:04:29 +01:00
commit ad8c23691a
2 changed files with 8 additions and 0 deletions

View File

@ -110,6 +110,7 @@
* Restore resumable hints delivery (CASSANDRA-11960)
* Properly report LWT contention (CASSANDRA-12626)
Merged from 3.0:
* Replace empty strings with null values if they cannot be converted (CASSANDRA-12794)
* Fix deserialization of 2.x DeletedCells (CASSANDRA-12620)
* Add parent repair session id to anticompaction log message (CASSANDRA-12186)
* Improve contention handling on failure to acquire MV lock for streaming and hints (CASSANDRA-12905)

View File

@ -2079,6 +2079,13 @@ class ImportConversion(object):
try:
return c(v) if v != self.nullval else self.get_null_val()
except Exception, e:
# if we could not convert an empty string, then self.nullval has been set to a marker
# because the user needs to import empty strings, except that the converters for some types
# will fail to convert an empty string, in this case the null value should be inserted
# see CASSANDRA-12794
if v == '':
return self.get_null_val()
if self.debug:
traceback.print_exc()
raise ParseError("Failed to parse %s : %s" % (val, e.message))