You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Jim Shi <hj...@yahoo.com> on 2015/09/05 06:38:20 UTC
memtable and sstables
Hi, I have a question:
in a read operation, why data in memtable needs merges with data in sstables?
I thought if a key exists in memtable, it has all the data related to the key. Is this assumption not correct?
Re: memtable and sstables
Posted by Jonathan Haddad <jo...@jonhaddad.com>.
Technically there could be data in an sstable with a later time stamp than
what exists in the memtable. Consider the use case of issuing a delete in
the future to avoid race conditions.
On Sat, Sep 5, 2015 at 10:42 AM Ray Sutton <ra...@gmail.com> wrote:
> This documentation from Datastax may be helpful to understand the purpose
> of memtables and sstables.
>
> http://docs.datastax.com/en/cassandra/2.0/cassandra/dml/dml_write_path_c.html
>
> Ray
>
> On Sat, Sep 5, 2015 at 10:36 AM Anuj Wadehra <an...@yahoo.co.in>
> wrote:
>
>> Memtables are for storing writes in memory till they are flushed to disk
>> as sstables and once flushed, space gets released from commit logs too.. If
>> your are updating some columns only that data would be there in memtables
>> not entire row..Dont think of memtables as row cache..
>>
>> This is my understanding..Anyone is free to add/correct info provided...
>>
>>
>> Anuj
>>
>> Sent from Yahoo Mail on Android
>> <https://overview.mail.yahoo.com/mobile/?.src=Android>
>> ------------------------------
>> *From*:"Jim Shi" <hj...@yahoo.com>
>> *Date*:Sat, 5 Sep, 2015 at 10:11 am
>> *Subject*:memtable and sstables
>>
>> Hi, I have a question:
>>
>> in a read operation, why data in memtable needs merges with data in
>> sstables?
>>
>> I thought if a key exists in memtable, it has all the data related to the
>> key. Is this assumption not correct?
>>
>
Re: memtable and sstables
Posted by Ray Sutton <ra...@gmail.com>.
This documentation from Datastax may be helpful to understand the purpose
of memtables and sstables.
http://docs.datastax.com/en/cassandra/2.0/cassandra/dml/dml_write_path_c.html
Ray
On Sat, Sep 5, 2015 at 10:36 AM Anuj Wadehra <an...@yahoo.co.in> wrote:
> Memtables are for storing writes in memory till they are flushed to disk
> as sstables and once flushed, space gets released from commit logs too.. If
> your are updating some columns only that data would be there in memtables
> not entire row..Dont think of memtables as row cache..
>
> This is my understanding..Anyone is free to add/correct info provided...
>
>
> Anuj
>
> Sent from Yahoo Mail on Android
> <https://overview.mail.yahoo.com/mobile/?.src=Android>
> ------------------------------
> *From*:"Jim Shi" <hj...@yahoo.com>
> *Date*:Sat, 5 Sep, 2015 at 10:11 am
> *Subject*:memtable and sstables
>
> Hi, I have a question:
>
> in a read operation, why data in memtable needs merges with data in
> sstables?
>
> I thought if a key exists in memtable, it has all the data related to the
> key. Is this assumption not correct?
>
Re: memtable and sstables
Posted by Anuj Wadehra <an...@yahoo.co.in>.
Memtables are for storing writes in memory till they are flushed to disk as sstables and once flushed, space gets released from commit logs too.. If your are updating some columns only that data would be there in memtables not entire row..Dont think of memtables as row cache..
This is my understanding..Anyone is free to add/correct info provided...
Anuj
Sent from Yahoo Mail on Android
From:"Jim Shi" <hj...@yahoo.com>
Date:Sat, 5 Sep, 2015 at 10:11 am
Subject:memtable and sstables
Hi, I have a question:
in a read operation, why data in memtable needs merges with data in sstables?
I thought if a key exists in memtable, it has all the data related to the key. Is this assumption not correct?