From ba7f6907f300b7ad74bd93b1ab1d61d425ab5841 Mon Sep 17 00:00:00 2001 From: Jonathan Ellis Date: Fri, 24 Apr 2009 00:52:09 +0000 Subject: [PATCH] avoid clearing out memtable during flush since it can still be accessed as a 'historial' MT. clearing during flush can lead to client seeing old data, if the clear is done before the sstable is completely written (so the next thing to be checked will be an old sstable). patch by Sandeep Tata; reviewed by jbellis for #98. git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768111 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/cassandra/db/Memtable.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/org/apache/cassandra/db/Memtable.java b/src/org/apache/cassandra/db/Memtable.java index 3954e97bf1..8c6149412f 100644 --- a/src/org/apache/cassandra/db/Memtable.java +++ b/src/org/apache/cassandra/db/Memtable.java @@ -399,15 +399,12 @@ public class Memtable implements Comparable /* Now write the key and value to disk */ ssTable.append(partitioner.decorateKey(key), buffer); bf.add(key); - columnFamily.clear(); } } ssTable.close(bf); cfStore.onMemtableFlush(cLogCtx); cfStore.storeLocation( ssTable.getDataFileLocation(), bf ); buffer.close(); - - columnFamilies_.clear(); } private class MemtableThreadPoolExecutor extends DebuggableThreadPoolExecutor