Git Product home page Git Product logo

Comments (4)

at15 avatar at15 commented on June 23, 2024

Blog

  • memtable + ss index + sstable
    • are keys sorted in memtable
    • the memtable is a hashtable or other? like I can use two array, one for key, one for value, it's just need to loop to find the array index of a given key
    • does sstable store key when using ss index
    • how is collapse achieved

leveldb code

Take away

  • sstable indexes (key + offset) are loaded into memory
  • write goes to memtable
  • memtable get flushed to disk
  • sstable are merged (collapsed together?)

from notes-on-tsdb.

at15 avatar at15 commented on June 23, 2024

Quora

Take away

  • how to manage efficiently merging only sub-portions of the key-space
    • LevelDB/RocksDB tackles it by liberally relying on a b-tree based intermediate layer, the filesystem.
    • The LSM in Cassandra, HBase, and Hypertable are very close to the LevelDB "filesystem layered" approach

C_0, C_1 (this is not the case for sstable guys I guess)

  • C_0 is AVL tree
  • C_1 is B tree

About merging process

Once written, older generations are never modified. You do row modifications by rewriting the rows/records into a newer generation where it is found first.

The nice thing is that the old data is still being used by the system while this mergy happens "in the background". During the merge process, rows/records modified by newer generations or marked deleted are removed by simply not writing them. Once the merge is complete, this combined generation replaces the two it merged.

from notes-on-tsdb.

at15 avatar at15 commented on June 23, 2024

Original paper

The most important part in the original paper should be about rolling merge, and especially how it handles recovery, but as I assume, its main focus is on index

  • TODO: is the original paper focus on index but later application use this method for storing actual data

from notes-on-tsdb.

at15 avatar at15 commented on June 23, 2024

Some questions asked by other students

  • what happens when I delete something in the lower level, if you delete something that is in memory, you can add a tombstone for it, but if it is in disk, do you load it to buffer and add a tombstone for it, or you read from multi levels and apply the filter when merge

from notes-on-tsdb.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.