cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [3/3] git commit: Merge branch 'cassandra-2.0' into trunk
Date Wed, 29 Jan 2014 20:18:35 GMT
Merge branch 'cassandra-2.0' into trunk

Conflicts:
	CHANGES.txt
	src/java/org/apache/cassandra/db/DataRange.java
	src/java/org/apache/cassandra/db/index/SecondaryIndex.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/82571546
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/82571546
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/82571546

Branch: refs/heads/trunk
Commit: 82571546efff0a3427fca3a000ffdf3f6c1e176c
Parents: 8f17bbd 287745e
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Wed Jan 29 14:18:20 2014 -0600
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Wed Jan 29 14:18:20 2014 -0600

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../cassandra/db/index/SecondaryIndex.java      | 22 +++++++++++++-------
 2 files changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/82571546/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/82571546/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/index/SecondaryIndex.java
index 81359af,fda28f0..7edfd94
--- a/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
+++ b/src/java/org/apache/cassandra/db/index/SecondaryIndex.java
@@@ -181,15 -180,21 +181,21 @@@ public abstract class SecondaryInde
                  getIndexName(), StringUtils.join(baseCfs.getSSTables(), ", ")));
  
          Collection<SSTableReader> sstables = baseCfs.markCurrentSSTablesReferenced();
-         SecondaryIndexBuilder builder = new SecondaryIndexBuilder(baseCfs,
-                                                                   Collections.singleton(getIndexName()),
-                                                                   new ReducingKeyIterator(sstables));
-         Future<?> future = CompactionManager.instance.submitIndexBuild(builder);
-         FBUtilities.waitOnFuture(future);
-         forceBlockingFlush();
- 
-         setIndexBuilt();
+         try
+         {
+             SecondaryIndexBuilder builder = new SecondaryIndexBuilder(baseCfs,
+                                                                       Collections.singleton(getIndexName()),
+                                                                       new ReducingKeyIterator(sstables));
+             Future<?> future = CompactionManager.instance.submitIndexBuild(builder);
+             FBUtilities.waitOnFuture(future);
+             forceBlockingFlush();
+             setIndexBuilt();
+         }
+         finally
+         {
+             SSTableReader.releaseReferences(sstables);
+         }
 -        logger.info("Index build of " + getIndexName() + " complete");
 +        logger.info("Index build of {} complete", getIndexName());
      }
  
  


Mime
View raw message