Permalink
Browse files

don't repeat last term

  • Loading branch information...
1 parent 944a399 commit 603549805015a31054e0e0b33d044eab472bfe1b @tjake committed Jul 18, 2011
Showing with 12 additions and 1 deletion.
  1. +7 −1 src/lucandra/LucandraTermEnum.java
  2. +5 −0 test/lucandra/cluster/IndexManagerTests.java
@@ -98,7 +98,13 @@ public boolean next() throws IOException
termView = termCache.skipTo(currentTermEntry.getKey());
- if (termView.size() < 2 && termView.firstEntry().getKey().equals(currentTermEntry.getKey()))
+ if (termView.size() == 0)
+ {
+
+ }
+
+ if (termView.size() == 0 ||
+ (termView.size() == 1 && termView.firstEntry().getKey().equals(currentTermEntry.getKey())))
{
currentTermEntry = null;
return false;
@@ -163,6 +163,7 @@ public void testCassandraIncrement3()
}
+ //Add and update ids from many shards at once (single node), verify no dups
@Test
public void testCassandraIncrement() throws IOException
{
@@ -221,6 +222,9 @@ public void testCassandraIncrement() throws IOException
}
}
+
+ //Tests id generations across many nodes and many shards
+ //waits for reserves to time out
@Test
public void testCassandraIncrement2() throws Exception
{
@@ -317,6 +321,7 @@ public void testCassandraIncrement2() throws Exception
}
+ //Tests the number of shards created
@Test
public void testCassandraIncrement4() throws Exception
{

0 comments on commit 6035498

Please sign in to comment.