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
This commit is contained in:
Jonathan Ellis 2009-04-24 00:52:09 +00:00
parent 2ec1b06e5f
commit ba7f6907f3
1 changed files with 0 additions and 3 deletions

View File

@ -399,15 +399,12 @@ public class Memtable implements Comparable<Memtable>
/* 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