Commit log segment "finish_and_get_new" should not call "new_segment"
explicitly, since more than one invocation might get there on the same
flush condition (segment full).
Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
Implements a cassandra-file-compatible segmented log
of "mutations". Handles "batch" and "periodic" mode like
stock version. Also includes "dirty" management for the
interaction log/memtable.
Supports:
* add
* sync/flush
* clear dirty bits (thus discarding segments)
Many more estoric stock functions not yet implemented.
Missing: Storage management. Does not deal with total
size on disk of segments yet. Nor does it have any provisions
for dealing with active buffer bloat should async writes stall.
[avi: adjust for future<>::rescue() removal]
Signed-off-by: Calle Wilund <calle@cloudius-systems.com>
Convert the schemas from LegacySchemaTables.java to C++.
Some FIXMEs still left because of types we don't yet support, or
schema features we don't yet support - this will be fixed later.
Note that I put legacy_schema_tables in the "db" namespace, not in the
"schema" namespace where Origin had it. This was the *only* class in
the "schema" package in Origin, and unfortunately in Urchin we can't use
the name "schema" as a namespace, as we already have it as a class.
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Only partially translated. I had to comment out some "static"
specifications to avoid compiler warnings because these are not used yet.
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
There's a proper column_family in database.hh now. Remove a stub that
was introduced during the initial conversion.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
For simplicity partition data is stored using the same object which is
used for mutations: mutation_partition. Later we can introduce a more
efficient version.
The new structure has common timestamp field extracted, it has the
same meaning for both live and dead cells. It will make it easier to
merge cells this way.
This model is meant to follow CQL more closely than the model in
Origin. We have direct representations for CQL rows and cells.
We avoid using thrift concepts here. Here's how some of the Origin's
classes map to this:
Mutation -> mutation
ColumnFamily -> partition
CellName -> clustering_key/clustering_prefix and column_id
Cell -> atomic_cell (not for collection types though)
Note about CounterMutation. CounterMutation is for modifying counter
tables. A counter table can only have one column, the counter
value. In Origin CounterMutation is a subclass of IMutation which
represents mutations on counter tables. The only field it adds is
consistency level. I think we don't need to have a separate class for
this, at least in the generic code, which simplifies things. We can
check whether the table is a counter table from the schema and we can
pass the consistency level from QueryOptions during serialization.
Fix the following build error:
In file included from ./db/cell.hh:29:0,
from ./db/expiring_cell.hh:26,
from cql3/attributes.hh:31,
from cql3/cql3.cc:33:
./db/composites/cell_name.hh: At global scope:
./db/composites/cell_name.hh:51:36: error: expected class-name before ‘{’ token
class cell_name : public composite {
^
ninja: build stopped: subcommand failed.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>