mirror of https://github.com/apache/cassandra
avoid unnecessarily serializations of RowMutations from both CommitLog and RowMutationVerbHandlers. patch by gdusbabek and jbellis; reviewed by goffinet for CASSANDRA-652
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/branches/cassandra-0.5@893619 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fd69da30b1
commit
e2cf8a2887
|
|
@ -16,6 +16,8 @@
|
|||
* fix bug determining closest neighbor for use in multiple datacenters
|
||||
(CASSANDRA-648)
|
||||
* Vast improvements in anticompaction speed (CASSANDRA-607)
|
||||
* Speed up log replay and writes by avoiding redundant serializations
|
||||
(CASSANDRA-652)
|
||||
|
||||
|
||||
0.5.0 beta 2
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ public class CommitLog
|
|||
{
|
||||
try
|
||||
{
|
||||
rm.apply(false);
|
||||
Table.open(rm.getTable()).apply(rm, null, false);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
|
@ -453,7 +453,7 @@ public class CommitLog
|
|||
* of any problems. This way we can assume that the subsequent commit log
|
||||
* entry will override the garbage left over by the previous write.
|
||||
*/
|
||||
void add(RowMutation rowMutation, DataOutputBuffer serializedRow) throws IOException
|
||||
void add(RowMutation rowMutation, Object serializedRow) throws IOException
|
||||
{
|
||||
Callable<CommitLogContext> task = new LogRecordAdder(rowMutation, serializedRow);
|
||||
|
||||
|
|
@ -621,7 +621,7 @@ public class CommitLog
|
|||
final RowMutation rowMutation;
|
||||
final Object serializedRow;
|
||||
|
||||
LogRecordAdder(RowMutation rm, DataOutputBuffer serializedRow)
|
||||
LogRecordAdder(RowMutation rm, Object serializedRow)
|
||||
{
|
||||
this.rowMutation = rm;
|
||||
this.serializedRow = serializedRow;
|
||||
|
|
|
|||
|
|
@ -200,12 +200,7 @@ public class RowMutation implements Serializable
|
|||
*/
|
||||
public void apply() throws IOException
|
||||
{
|
||||
apply(true);
|
||||
}
|
||||
|
||||
public void apply(boolean writeCommitLog) throws IOException
|
||||
{
|
||||
Table.open(table_).apply(this, this.getSerializedBuffer(), writeCommitLog);
|
||||
Table.open(table_).apply(this, getSerializedBuffer(), true);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ public class RowMutationVerbHandler implements IVerbHandler
|
|||
hintedMutation.apply();
|
||||
}
|
||||
|
||||
Table.open(rm.getTable()).apply(rm, bytes, true);
|
||||
rm.apply();
|
||||
|
||||
WriteResponse response = new WriteResponse(rm.getTable(), rm.key(), true);
|
||||
|
|
|
|||
|
|
@ -428,7 +428,7 @@ public class Table
|
|||
* Once this happens the data associated with the individual column families
|
||||
* is also written to the column family store's memtable.
|
||||
*/
|
||||
void apply(RowMutation mutation, DataOutputBuffer serializedMutation, boolean writeCommitLog) throws IOException
|
||||
void apply(RowMutation mutation, Object serializedMutation, boolean writeCommitLog) throws IOException
|
||||
{
|
||||
HashMap<ColumnFamilyStore,Memtable> memtablesToFlush = new HashMap<ColumnFamilyStore, Memtable>(2);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue