You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Artur Siekielski <ar...@vhex.net> on 2017/02/03 10:21:41 UTC

In-place updates in a MemTable?

Hi,

if I issue an update to a row (non-PK keys), and the old row is still 
stored in a MemTable, is the old row updated in-place in the MemTable, 
or a new entry in the MemTable in created and the old row will be 
removed only by the SSTable compaction process?

(Cassandra 2.1)

Re: In-place updates in a MemTable?

Posted by Artur Siekielski <ar...@vhex.net>.
After studying org.apache.cassandra.db.Memtable.put method it looks like 
the update is made in-place. The MemTable is just a mapping from a row 
key to a single btree of column values, and an update operation just 
updates the btree stored under the existing key.

On 02/03/2017 11:21 AM, Artur Siekielski wrote:
> Hi,
>
> if I issue an update to a row (non-PK keys), and the old row is still
> stored in a MemTable, is the old row updated in-place in the MemTable,
> or a new entry in the MemTable in created and the old row will be
> removed only by the SSTable compaction process?
>
> (Cassandra 2.1)