mirror of https://github.com/apache/cassandra
Fix more stress bugs (ninja)
This commit is contained in:
parent
6c3a3e1301
commit
a8052d7c81
|
|
@ -271,10 +271,13 @@ public class Partition
|
|||
tosort.add((Comparable) generator.generate());
|
||||
Collections.sort(tosort);
|
||||
for (int i = 0 ; i < count ; i++)
|
||||
if (i == 0 || tosort.get(i - 1).compareTo(i) < 0)
|
||||
queue.add(tosort.get(i));
|
||||
queue.add(tosort.get(i));
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RuntimeException("Generator class is not comparable: "+generator.clazz);
|
||||
}
|
||||
case ARBITRARY:
|
||||
unique.clear();
|
||||
for (int i = 0 ; i < count ; i++)
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public class SchemaInsert extends SchemaStatement
|
|||
// 65535 is max number of stmts per batch, so if we have more, we need to manually batch them
|
||||
for (int j = 0 ; j < stmts.size() ; j += 65535)
|
||||
{
|
||||
List<BoundStatement> substmts = stmts.subList(j, Math.min(stmts.size(), j + 65535));
|
||||
List<BoundStatement> substmts = stmts.subList(j, Math.min(j + stmts.size(), j + 65535));
|
||||
Statement stmt;
|
||||
if (stmts.size() == 1)
|
||||
{
|
||||
|
|
@ -98,7 +98,14 @@ public class SchemaInsert extends SchemaStatement
|
|||
stmt = batch;
|
||||
}
|
||||
|
||||
validate(client.getSession().execute(stmt));
|
||||
try
|
||||
{
|
||||
validate(client.getSession().execute(stmt));
|
||||
}
|
||||
catch (ClassCastException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
for (Partition.RowIterator iterator : iterators)
|
||||
|
|
|
|||
Loading…
Reference in New Issue