cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject svn commit: r1021852 - in /cassandra/trunk: ./ interface/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/avro/ src/java/org/apache/cassandra/service/ src/java/org/apache/cassandra/thrift/ test/system/
Date Tue, 12 Oct 2010 17:33:53 GMT
Author: brandonwilliams
Date: Tue Oct 12 17:33:53 2010
New Revision: 1021852

URL: http://svn.apache.org/viewvc?rev=1021852&view=rev
Log:
Remove ConsistencyLevel.ZERO.  Patch by jbellis, reviewed by brandonwilliams for CASSANDRA-1607.

Removed:
    cassandra/trunk/src/java/org/apache/cassandra/service/NoConsistencyWriteResponseHandler.java
Modified:
    cassandra/trunk/CHANGES.txt
    cassandra/trunk/interface/cassandra.genavro
    cassandra/trunk/interface/cassandra.thrift
    cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ConsistencyLevel.java
    cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java
    cassandra/trunk/src/java/org/apache/cassandra/service/DatacenterSyncWriteResponseHandler.java
    cassandra/trunk/src/java/org/apache/cassandra/service/DatacenterWriteResponseHandler.java
    cassandra/trunk/src/java/org/apache/cassandra/service/WriteResponseHandler.java
    cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java
    cassandra/trunk/test/system/test_avro_super.py
    cassandra/trunk/test/system/test_thrift_server.py

Modified: cassandra/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1021852&r1=1021851&r2=1021852&view=diff
==============================================================================
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Tue Oct 12 17:33:53 2010
@@ -28,6 +28,7 @@ dev
  * add cli support for schema modification (CASSANDRA-1584)
  * delete temp files on failed compactions (CASSANDRA-1596)
  * avoid blocking for dead nodes during removetoken (CASSANDRA-1605)
+ * remove ConsistencyLevel.ZERO (CASSANDRA-1607)
 
 
 0.7-beta2

Modified: cassandra/trunk/interface/cassandra.genavro
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/cassandra.genavro?rev=1021852&r1=1021851&r2=1021852&view=diff
==============================================================================
--- cassandra/trunk/interface/cassandra.genavro (original)
+++ cassandra/trunk/interface/cassandra.genavro Tue Oct 12 17:33:53 2010
@@ -192,7 +192,7 @@ protocol Cassandra {
     }
 
     enum ConsistencyLevel {
-        ZERO, ONE, QUORUM, DCQUORUM, DCQUORUMSYNC, ALL
+        ONE, QUORUM, DCQUORUM, DCQUORUMSYNC, ALL
     }
 
     error InvalidRequestException {

Modified: cassandra/trunk/interface/cassandra.thrift
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/cassandra.thrift?rev=1021852&r1=1021851&r2=1021852&view=diff
==============================================================================
--- cassandra/trunk/interface/cassandra.thrift (original)
+++ cassandra/trunk/interface/cassandra.thrift Tue Oct 12 17:33:53 2010
@@ -46,7 +46,7 @@ namespace rb CassandraThrift
 #           for every edit that doesn't result in a change to major/minor.
 #
 # See the Semantic Versioning Specification (SemVer) http://semver.org.
-const string VERSION = "18.1.0"
+const string VERSION = "19.0.0"
 
 
 #
@@ -139,7 +139,6 @@ exception AuthorizationException {
  * important than consistency then you can use lower values for either or both.
  *
  * Write consistency levels make the following guarantees before reporting success to the
client:
- *   ZERO         Ensure nothing. A write happens asynchronously in background
  *   ANY          Ensure that the write has been written once somewhere, including possibly
being hinted in a non-target node.
  *   ONE          Ensure that the write has been written to at least 1 node's commit log
and memory table
  *   QUORUM       Ensure that the write has been written to <ReplicationFactor> / 2
+ 1 nodes
@@ -148,7 +147,6 @@ exception AuthorizationException {
  *   ALL          Ensure that the write is written to <code>&lt;ReplicationFactor&gt;</code>
nodes before responding to the client.
  *
  * Read:
- *   ZERO         Not supported, because it doesn't make sense.
  *   ANY          Not supported. You probably want ONE instead.
  *   ONE          Will return the record returned by the first node to respond. A consistency
check is always done in a background thread to fix any consistency issues when ConsistencyLevel.ONE
is used. This means subsequent calls will have correct data even if the initial read gets
an older value. (This is called 'read repair'.)
  *   QUORUM       Will query all storage nodes and return the record with the most recent
timestamp once it has at least a majority of replicas reported. Again, the remaining replicas
will be checked in the background.
@@ -157,7 +155,6 @@ exception AuthorizationException {
  *   ALL          Queries all storage nodes and returns the record with the most recent timestamp.
 */
 enum ConsistencyLevel {
-    ZERO = 0,
     ONE = 1,
     QUORUM = 2,
     DCQUORUM = 3,

Modified: cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ConsistencyLevel.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ConsistencyLevel.java?rev=1021852&r1=1021851&r2=1021852&view=diff
==============================================================================
--- cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ConsistencyLevel.java
(original)
+++ cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/ConsistencyLevel.java
Tue Oct 12 17:33:53 2010
@@ -41,7 +41,6 @@ import org.apache.thrift.TEnum;
  * important than consistency then you can use lower values for either or both.
  * 
  * Write consistency levels make the following guarantees before reporting success to the
client:
- *   ZERO         Ensure nothing. A write happens asynchronously in background
  *   ANY          Ensure that the write has been written once somewhere, including possibly
being hinted in a non-target node.
  *   ONE          Ensure that the write has been written to at least 1 node's commit log
and memory table
  *   QUORUM       Ensure that the write has been written to <ReplicationFactor> / 2
+ 1 nodes
@@ -50,7 +49,6 @@ import org.apache.thrift.TEnum;
  *   ALL          Ensure that the write is written to <code>&lt;ReplicationFactor&gt;</code>
nodes before responding to the client.
  * 
  * Read:
- *   ZERO         Not supported, because it doesn't make sense.
  *   ANY          Not supported. You probably want ONE instead.
  *   ONE          Will return the record returned by the first node to respond. A consistency
check is always done in a background thread to fix any consistency issues when ConsistencyLevel.ONE
is used. This means subsequent calls will have correct data even if the initial read gets
an older value. (This is called 'read repair'.)
  *   QUORUM       Will query all storage nodes and return the record with the most recent
timestamp once it has at least a majority of replicas reported. Again, the remaining replicas
will be checked in the background.
@@ -59,7 +57,6 @@ import org.apache.thrift.TEnum;
  *   ALL          Queries all storage nodes and returns the record with the most recent timestamp.
  */
 public enum ConsistencyLevel implements TEnum {
-  ZERO(0),
   ONE(1),
   QUORUM(2),
   DCQUORUM(3),
@@ -86,8 +83,6 @@ public enum ConsistencyLevel implements 
    */
   public static ConsistencyLevel findByValue(int value) { 
     switch (value) {
-      case 0:
-        return ZERO;
       case 1:
         return ONE;
       case 2:

Modified: cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java?rev=1021852&r1=1021851&r2=1021852&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java Tue Oct 12 17:33:53
2010
@@ -173,9 +173,6 @@ public class CassandraServer implements 
         // TODO - Support multiple column families per row, right now row only contains 1
column family
         Map<DecoratedKey<?>, ColumnFamily> columnFamilyKeyMap = new HashMap<DecoratedKey<?>,
ColumnFamily>();
         
-        if (consistency == ConsistencyLevel.ZERO)
-            throw newInvalidRequestException("Consistency level zero may not be applied to
read operations");
-        
         List<Row> rows;
         try
         {
@@ -607,7 +604,6 @@ public class CassandraServer implements 
     {
         switch (consistency)
         {
-            case ZERO: return org.apache.cassandra.thrift.ConsistencyLevel.ZERO;
             case ONE: return org.apache.cassandra.thrift.ConsistencyLevel.ONE;
             case QUORUM: return org.apache.cassandra.thrift.ConsistencyLevel.QUORUM;
             case DCQUORUM: return org.apache.cassandra.thrift.ConsistencyLevel.DCQUORUM;

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/DatacenterSyncWriteResponseHandler.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/DatacenterSyncWriteResponseHandler.java?rev=1021852&r1=1021851&r2=1021852&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/DatacenterSyncWriteResponseHandler.java
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/DatacenterSyncWriteResponseHandler.java
Tue Oct 12 17:33:53 2010
@@ -74,14 +74,7 @@ public class DatacenterSyncWriteResponse
 
     public static IWriteResponseHandler create(Collection<InetAddress> writeEndpoints,
Multimap<InetAddress, InetAddress> hintedEndpoints, ConsistencyLevel consistencyLevel,
String table)
     {
-        if (consistencyLevel == ConsistencyLevel.ZERO)
-        {
-            return NoConsistencyWriteResponseHandler.instance;
-        }
-        else
-        {
-            return new DatacenterSyncWriteResponseHandler(writeEndpoints, hintedEndpoints,
consistencyLevel, table);
-        }
+        return new DatacenterSyncWriteResponseHandler(writeEndpoints, hintedEndpoints, consistencyLevel,
table);
     }
 
     public void response(Message message)

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/DatacenterWriteResponseHandler.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/DatacenterWriteResponseHandler.java?rev=1021852&r1=1021851&r2=1021852&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/DatacenterWriteResponseHandler.java
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/DatacenterWriteResponseHandler.java
Tue Oct 12 17:33:53 2010
@@ -59,14 +59,7 @@ public class DatacenterWriteResponseHand
 
     public static IWriteResponseHandler create(Collection<InetAddress> writeEndpoints,
Multimap<InetAddress, InetAddress> hintedEndpoints, ConsistencyLevel consistencyLevel,
String table)
     {
-        if (consistencyLevel == ConsistencyLevel.ZERO)
-        {
-            return NoConsistencyWriteResponseHandler.instance;
-        }
-        else
-        {
-            return new DatacenterWriteResponseHandler(writeEndpoints, hintedEndpoints, consistencyLevel,
table);
-        }
+        return new DatacenterWriteResponseHandler(writeEndpoints, hintedEndpoints, consistencyLevel,
table);
     }
 
     @Override

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/WriteResponseHandler.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/WriteResponseHandler.java?rev=1021852&r1=1021851&r2=1021852&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/WriteResponseHandler.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/WriteResponseHandler.java Tue Oct
12 17:33:53 2010
@@ -57,14 +57,7 @@ public class WriteResponseHandler extend
 
     public static IWriteResponseHandler create(Collection<InetAddress> writeEndpoints,
Multimap<InetAddress, InetAddress> hintedEndpoints, ConsistencyLevel consistencyLevel,
String table)
     {
-        if (consistencyLevel == ConsistencyLevel.ZERO)
-        {
-            return NoConsistencyWriteResponseHandler.instance;
-        }
-        else
-        {
-            return new WriteResponseHandler(writeEndpoints, hintedEndpoints, consistencyLevel,
table);
-        }
+        return new WriteResponseHandler(writeEndpoints, hintedEndpoints, consistencyLevel,
table);
     }
 
     public static IWriteResponseHandler create(InetAddress endpoint)

Modified: cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java?rev=1021852&r1=1021851&r2=1021852&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/thrift/CassandraServer.java Tue Oct 12 17:33:53
2010
@@ -102,10 +102,6 @@ public class CassandraServer implements 
         // TODO - Support multiple column families per row, right now row only contains 1
column family
         Map<DecoratedKey, ColumnFamily> columnFamilyKeyMap = new HashMap<DecoratedKey,
ColumnFamily>();
 
-        if (consistency_level == ConsistencyLevel.ZERO)
-        {
-            throw new InvalidRequestException("Consistency level zero may not be applied
to read operations");
-        }
         if (consistency_level == ConsistencyLevel.ANY)
         {
             throw new InvalidRequestException("Consistency level any may not be applied to
read operations");

Modified: cassandra/trunk/test/system/test_avro_super.py
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/system/test_avro_super.py?rev=1021852&r1=1021851&r2=1021852&view=diff
==============================================================================
--- cassandra/trunk/test/system/test_avro_super.py (original)
+++ cassandra/trunk/test/system/test_avro_super.py Tue Oct 12 17:33:53 2010
@@ -88,24 +88,6 @@ def Column(name, value, timestamp, ttl=N
 def _i64(i):
     return avro_utils.i64(i)
 
-def waitfor(secs, fn, *args, **kwargs):
-    start = time.time()
-    success = False
-    last_exception = None
-    while not success and time.time() < start + secs:
-        try:
-            fn(*args, **kwargs)
-            success = True
-        except KeyboardInterrupt:
-            raise
-        except Exception, e:
-            last_exception = e
-            pass
-    if not success and last_exception:
-        raise last_exception
-
-ZERO_WAIT = 5
-    
 _SUPER_COLUMNS = [_super_col('sc1', [Column(avro_utils.i64(4), 'value4', 0)]), 
                   _super_col('sc2', [Column(avro_utils.i64(5), 'value5', 0), 
                                      Column(avro_utils.i64(6), 'value6', 0)])]
@@ -226,12 +208,12 @@ class TestSuperOperations(AvroTester):
         def _assert_no_columnpath(key, column_path):
             self._assert_no_columnpath(key, column_path)
             
-        self.client.request('batch_mutate', {'mutation_map': keyed_mutations, 'consistency_level':
'ZERO'})
+        self.client.request('batch_mutate', {'mutation_map': keyed_mutations, 'consistency_level':
'ONE'})
         for column_family in column_families:
             for sc in _SUPER_COLUMNS:
                 for c in sc['columns']:
                     for key in keys:
-                        waitfor(ZERO_WAIT, _assert_no_columnpath, key, ColumnPath(column_family,
super_column=sc['name'], column=c['name']))
+                        _assert_no_columnpath(key, ColumnPath(column_family, super_column=sc['name'],
column=c['name']))
                         
         
     # internal helper functions.

Modified: cassandra/trunk/test/system/test_thrift_server.py
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/system/test_thrift_server.py?rev=1021852&r1=1021851&r2=1021852&view=diff
==============================================================================
--- cassandra/trunk/test/system/test_thrift_server.py (original)
+++ cassandra/trunk/test/system/test_thrift_server.py Tue Oct 12 17:33:53 2010
@@ -56,31 +56,22 @@ def _assert_no_columnpath(key, column_pa
         assert True, 'column did not exist'
 
 def _insert_simple(block=True):
-   return _insert_multi(['key1'], block)
+   return _insert_multi(['key1'])
 
 def _insert_batch(block):
    return _insert_multi_batch(['key1'], block)
 
-def _insert_multi(keys, block=True):
-    if block:
-        consistencyLevel = ConsistencyLevel.ONE
-    else:
-        consistencyLevel = ConsistencyLevel.ZERO
-
+def _insert_multi(keys):
+    CL = ConsistencyLevel.ONE
     for key in keys:
-        client.insert(key, ColumnParent('Standard1'), Column('c1', 'value1', 0), consistencyLevel)
-        client.insert(key, ColumnParent('Standard1'), Column('c2', 'value2', 0), consistencyLevel)
+        client.insert(key, ColumnParent('Standard1'), Column('c1', 'value1', 0), CL)
+        client.insert(key, ColumnParent('Standard1'), Column('c2', 'value2', 0), CL)
 
 def _insert_multi_batch(keys, block):
     cfmap = {'Standard1': [Mutation(ColumnOrSuperColumn(c)) for c in _SIMPLE_COLUMNS],
              'Standard2': [Mutation(ColumnOrSuperColumn(c)) for c in _SIMPLE_COLUMNS]}
-    if block:
-        consistencyLevel = ConsistencyLevel.ONE
-    else:
-        consistencyLevel = ConsistencyLevel.ZERO
-
     for key in keys:
-        client.batch_mutate({key: cfmap}, consistencyLevel)
+        client.batch_mutate({key: cfmap}, ConsistencyLevel.ONE)
 
 def _big_slice(key, column_parent):
     p = SlicePredicate(slice_range=SliceRange('', '', False, 1000))
@@ -103,9 +94,9 @@ def _verify_simple():
     assert L == _SIMPLE_COLUMNS, L
 
 def _insert_super(key='key1'):
-    client.insert(key, ColumnParent('Super1', 'sc1'), Column(_i64(4), 'value4', 0), ConsistencyLevel.ZERO)
-    client.insert(key, ColumnParent('Super1', 'sc2'), Column(_i64(5), 'value5', 0), ConsistencyLevel.ZERO)
-    client.insert(key, ColumnParent('Super1', 'sc2'), Column(_i64(6), 'value6', 0), ConsistencyLevel.ZERO)
+    client.insert(key, ColumnParent('Super1', 'sc1'), Column(_i64(4), 'value4', 0), ConsistencyLevel.ONE)
+    client.insert(key, ColumnParent('Super1', 'sc2'), Column(_i64(5), 'value5', 0), ConsistencyLevel.ONE)
+    client.insert(key, ColumnParent('Super1', 'sc2'), Column(_i64(6), 'value6', 0), ConsistencyLevel.ONE)
     time.sleep(0.1)
 
 def _insert_range():
@@ -139,10 +130,10 @@ def _set_keyspace(keyspace):
     client.set_keyspace(keyspace)
 
 def _insert_super_range():
-    client.insert('key1', ColumnParent('Super1', 'sc1'), Column(_i64(4), 'value4', 0), False)
-    client.insert('key1', ColumnParent('Super1', 'sc2'), Column(_i64(5), 'value5', 0), False)
-    client.insert('key1', ColumnParent('Super1', 'sc2'), Column(_i64(6), 'value6', 0), False)
-    client.insert('key1', ColumnParent('Super1', 'sc3'), Column(_i64(7), 'value7', 0), False)
+    client.insert('key1', ColumnParent('Super1', 'sc1'), Column(_i64(4), 'value4', 0), ConsistencyLevel.ONE)
+    client.insert('key1', ColumnParent('Super1', 'sc2'), Column(_i64(5), 'value5', 0), ConsistencyLevel.ONE)
+    client.insert('key1', ColumnParent('Super1', 'sc2'), Column(_i64(6), 'value6', 0), ConsistencyLevel.ONE)
+    client.insert('key1', ColumnParent('Super1', 'sc3'), Column(_i64(7), 'value7', 0), ConsistencyLevel.ONE)
     time.sleep(0.1)
 
 def _verify_super_range():
@@ -175,29 +166,11 @@ def _expect_exception(fn, type_):
 def _expect_missing(fn):
     _expect_exception(fn, NotFoundException)
 
-def waitfor(secs, fn, *args, **kwargs):
-    start = time.time()
-    success = False
-    last_exception = None
-    while not success and time.time() < start + secs:
-        try:
-            fn(*args, **kwargs)
-            success = True
-        except KeyboardInterrupt:
-            raise
-        except Exception, e:
-            last_exception = e
-            pass
-    if not success and last_exception:
-        raise last_exception
-
 def get_range_slice(client, parent, predicate, start, end, count, cl):
     kr = KeyRange(start, end, count=count)
     return client.get_range_slices(parent, predicate, kr, cl)
     
 
-ZERO_WAIT = 5
-
 class TestMutations(ThriftTester):
     def test_insert(self):
         _set_keyspace('Keyspace1')
@@ -390,11 +363,11 @@ class TestMutations(ThriftTester):
         mutation_map = dict((column_family, mutations) for column_family in column_families)
         keyed_mutations = dict((key, mutation_map) for key in keys)
 
-        client.batch_mutate(keyed_mutations, ConsistencyLevel.ZERO)
+        client.batch_mutate(keyed_mutations, ConsistencyLevel.ONE)
 
         for column_family in column_families:
             for key in keys:
-               waitfor(ZERO_WAIT, _assert_column, column_family, key, 'c1', 'value1')
+               _assert_column(column_family, key, 'c1', 'value1')
 
     def test_batch_mutate_standard_columns_blocking(self):
         _set_keyspace('Keyspace1')
@@ -465,12 +438,12 @@ class TestMutations(ThriftTester):
 
         keyed_mutations = dict((key, mutation_map) for key in keys)
 
-        client.batch_mutate(keyed_mutations, ConsistencyLevel.ZERO)
+        client.batch_mutate(keyed_mutations, ConsistencyLevel.ONE)
         for column_family in column_families:
             for sc in _SUPER_COLUMNS:
                 for c in sc.columns:
                     for key in keys:
-                        waitfor(ZERO_WAIT, _assert_no_columnpath, key, ColumnPath(column_family,
super_column=sc.name, column=c.name))
+                        _assert_no_columnpath(key, ColumnPath(column_family, super_column=sc.name,
column=c.name))
 
     def test_batch_mutate_remove_super_columns_with_none_given_underneath(self):
         _set_keyspace('Keyspace1')
@@ -495,12 +468,12 @@ class TestMutations(ThriftTester):
             for key in keys:
                 _assert_columnpath_exists(key, ColumnPath('Super1', super_column=sc.name))
 
-        client.batch_mutate(keyed_mutations, ConsistencyLevel.ZERO)
+        client.batch_mutate(keyed_mutations, ConsistencyLevel.ONE)
 
         for sc in _SUPER_COLUMNS:
             for c in sc.columns:
                 for key in keys:
-                    waitfor(ZERO_WAIT, _assert_no_columnpath, key, ColumnPath('Super1', super_column=sc.name))
+                    _assert_no_columnpath(key, ColumnPath('Super1', super_column=sc.name))
     
     def test_batch_mutate_remove_super_columns_entire_row(self):
         _set_keyspace('Keyspace1')
@@ -523,11 +496,11 @@ class TestMutations(ThriftTester):
             for key in keys:
                 _assert_columnpath_exists(key, ColumnPath('Super1', super_column=sc.name))
 
-        client.batch_mutate(keyed_mutations, ConsistencyLevel.ZERO)
+        client.batch_mutate(keyed_mutations, ConsistencyLevel.ONE)
 
         for sc in _SUPER_COLUMNS:
           for key in keys:
-            waitfor(ZERO_WAIT, _assert_no_columnpath, key, ColumnPath('Super1', super_column=sc.name))
+            _assert_no_columnpath(key, ColumnPath('Super1', super_column=sc.name))
 
     def test_batch_mutate_insertions_and_deletions(self):
         _set_keyspace('Keyspace1')
@@ -686,9 +659,9 @@ class TestMutations(ThriftTester):
                              for c in _SUPER_COLUMNS],
                   'Super2': [Mutation(ColumnOrSuperColumn(super_column=c))
                              for c in _SUPER_COLUMNS]}
-         client.batch_mutate({'key1': cfmap}, ConsistencyLevel.ZERO)
-         waitfor(ZERO_WAIT, _verify_super, 'Super1')
-         waitfor(ZERO_WAIT, _verify_super, 'Super2')
+         client.batch_mutate({'key1': cfmap}, ConsistencyLevel.ONE)
+         _verify_super('Super1')
+         _verify_super('Super2')
 
     def test_batch_insert_super_blocking(self):
          _set_keyspace('Keyspace1')



Mime
View raw message