incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Overton <sover...@acunu.com>
Subject Re: LevelDB type compaction
Date Fri, 23 Sep 2011 09:39:02 GMT
On 17 September 2011 00:58, mcasandra <mohitanchlia@gmail.com> wrote:

> >
> >> and updates could be scattered all over
> >> before compaction?
> >
> > No, updates to a given row will be still be in a single sstable.
>
> Can you please explain little more? You mean that if Level 1 file contains
> range from 1-100 all the updates would still go in that file?
>

No, sstables are never written to. All updates go to a memtable, which is
then flushed to a Level0 sstable. Compaction then causes promotion of
updates to gradually higher levels.


> The link on leveldb says:
>
> > The compaction picks a file from level L and all overlapping files from
> > the next level L+1
>
> If all updates go in the same sstables then how do overlapping files get
> generated. By overlapping I am assuming it means new or updated value for a
> given key exists in multiple files?
>

Overlapping refers to the range of keys. The key ranges contained within the
files in any given level represent a set of disjoint intervals (when level
>=1). For Level0, the files may contain overlapping ranges.


> Thanks for the explanation
>

Disclaimer: I haven't read the code, this is just my understanding from
reading the docs.


Sam Overton
Acunu | http://www.acunu.com | @acunu

Mime
View raw message