Commit Graph

53948 Commits

Author SHA1 Message Date
Asias He
e074b1b7f8 gossip: Move operator<< of gossip_digest_ack2 to gossip_digest_ack2.cc 2015-07-31 10:43:39 +08:00
Asias He
ca5eea7fad gossip: Move operator<< of gossip_digest_ack to gossip_digest_ack.cc 2015-07-31 10:43:39 +08:00
Asias He
76efae87b5 gossip: Move operator<< of gossip_digest_syn to gossip_digest_syn.cc 2015-07-31 10:43:39 +08:00
Asias He
d850e4ef31 gossip: Move _the_gossiper to gossiper.cc 2015-07-31 10:43:39 +08:00
Asias He
4390b448a2 gossip: Move _the_failure_detector to failure_detector.cc
We will kill gms/gms.cc soon.
2015-07-31 10:43:39 +08:00
Asias He
d4dce4aa43 gossip: Fix is_enabled 2015-07-31 10:43:39 +08:00
Asias He
5d08bd030c gossip: Kill one more unimplemented in shutdown 2015-07-31 10:43:39 +08:00
Asias He
efbdf428fc gossip: Remove commented code of resetVersion and destroyConnectionPool
Our messaging service is completely different. No need to reset version
or destroy connection pool.
2015-07-31 10:43:39 +08:00
Asias He
43c7ff217d gossip: Kill two warn unimplemented
It is implemented now.
2015-07-31 10:43:39 +08:00
Nadav Har'El
499014a486 main: exit on exception
Our main has a "on_terminate()" to make sure it exits when there is an
exception during initialization, instead of hanging. But it's in the
wrong place - it needs to be on the outer future.

Before this patch, an error parsing the command line will result in
a "WARNING: exceptional future ignored ..." and a hang, instead of a
"Exiting on unhandled exception..." and an exit as we get after this
patch.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-07-30 19:32:52 +03:00
Avi Kivity
53ed89c4d9 Merge seastar upstream
* seastar 732dba1...beeaccb (4):
  > future: fix parallel_for_each returning to quickly on error
  > tests: add test case for parallel_for_each early return on error
  > net::dpdk::i40e_should_linearize(): Don't assume that all headers are in frag0
  > net::dpdk: rename max_non_tso_i40e_frags
2015-07-30 19:12:07 +03:00
Paweł Dziepak
6f0af11051 mutation_partition: row_marker: fix operator==()
If row marker is missing _ttl and _expiry are meaningless.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-30 17:58:30 +03:00
Tomasz Grabiec
2ce49343a4 Merge branch 'pdziepak/row-ttl/v3' from seastar-dev.git
Handling row marker expiry from Pawel:

This series fixes row expiration. Row markers are used to make sure that
row exists even if it has no cells and therefore they also need to be
expired properly. Origin gets that for free since in their architecture
row marker is a normal cell. We use different approach with deletable_row
storing marker information and therefore additional logic must be added
to make sure that expiration works correctly.
2015-07-30 14:31:54 +02:00
Paweł Dziepak
6121fded85 tests/cql3: add more ttl tests
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-30 14:10:06 +02:00
Paweł Dziepak
9300457df7 mutation_partition: drop deletable_row::apply(api::timestamp_type)
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-30 14:10:06 +02:00
Paweł Dziepak
690e9b55f4 cql3: set proper expiration of row marker
INSERT statements update row marker ttl and expiry to the same values
which are set to the added/modified cells.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-30 14:10:06 +02:00
Paweł Dziepak
430f74a8bb sstables: read expired or expiring row marker
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-30 14:10:06 +02:00
Paweł Dziepak
f5e3764570 sstables: properly write expiring row marker
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-30 14:10:06 +02:00
Paweł Dziepak
32b9879a34 mutation_partition: apply row marker in apply()
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-30 14:10:06 +02:00
Paweł Dziepak
39c8e29566 mutation_partition: try to compact and expire row marker
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-30 14:10:06 +02:00
Paweł Dziepak
11e1d82403 mutation_partition: serialize row_marker of deletable_row
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-30 14:10:06 +02:00
Paweł Dziepak
c84763d434 mutation_partition: use row_marker in deletable_row
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-30 14:10:06 +02:00
Paweł Dziepak
ed21fd1ef8 mutation_partition: add row_marker class
Row marker can be in one of three states: missing, live (possibly
expiring) or dead. Since it basically behaves like a normal cell, except
it doesn't have any value, row_marker class provides an interface
similar to atomic_cell.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-30 14:10:06 +02:00
Paweł Dziepak
f5fff734ed cq3: update_parameters: add getters for ttl and expiry
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-30 14:10:06 +02:00
Paweł Dziepak
53be987a6d db: read default ttl from legacy schema tables
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-30 14:10:06 +02:00
Paweł Dziepak
87916612bd cql3: set default time to live when building schema
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-30 14:09:00 +02:00
Avi Kivity
c710a7716b Merge 2015-07-30 13:39:55 +03:00
Avi Kivity
365ee0aee1 Merge seastar upstream
* seastar 572ec2d...732dba1 (4):
  > smp: always return exceptions as failed futures in smp::submit_to()
  > tests: add packet test
  > packet: try harder in prepend_uninitialized_header()
  > packet: fix unuse_internal_data()
2015-07-30 13:30:24 +03:00
Tomasz Grabiec
c68c37ae2f Revert "schema: support dropped columns"
This reverts commit 9887bc5f5f.

Breaks "CREATE TABLE" statement.
2015-07-30 10:56:01 +02:00
Avi Kivity
3a69561061 gdb: add 'scylla memory' command
Useful for analyzing memory leaks:

(gdb) scylla memory
objsz spansz    usedobj       memory  wst%
    1   4096          0            0   0.0
    1   4096          0            0   0.0
    1   4096          0            0   0.0
    1   4096          0            0   0.0
    2   4096          0            0   0.0
    2   4096          0            0   0.0
    3   4096          0            0   0.0
    3   4096          0            0   0.0
    4   4096          0            0   0.0
    5   4096          0            0   0.0
    6   4096          0            0   0.0
    7   4096          0            0   0.0
    8   4096        422         8192  58.8
   10   4096          0            0   0.0
   12   4096          0            0   0.0
   14   4096          0         8192  99.8
   16   4096        409         8192  20.1
   20   4096          0            0   0.0
   24   4096          0            0   0.0
   28   4096        653        24576  25.4
   32   4096       1069        36864   7.2
   40   4096          0            0   0.0
   48   4096          0            0   0.0
   56   4096       1228        73728   6.5
   64   4096        616        40960   3.8
   80   4096          0            0   0.0
   96   4096          0            0   0.0
  112   4096        919       110592   5.4
  128   4096        141        24576  26.6
  160   8192          0            0   0.0
  192   8192          0            0   0.0
  224   8192        128        49152  40.1
  256   8192         72        40960  55.0
  320  16384          0            0   0.0
  384  16384          0            0   0.0
  448  16384         60        49152  43.8
  512  16384         29        49152  69.8
  640  32768          0            0   0.0
  768  32768          0            0   0.0
  896  32768         47        98304  55.6
 1024  32768          5        98304  94.8
 1280  65536          0            0   0.0
 1536  65536          0            0   0.0
 1792  65536         31       196608  70.2
 2048  65536          8       196608  91.7
 2560 131072          0            0   0.0
 3072 131072          0            0   0.0
 3584 131072         34       393216  67.4
 4096 131072          0       393216 100.0
 5120 262144          0            0   0.0
 6144 262144          0            0   0.0
 7168 262144         33       786432  68.4
 8192 262144          4       786432  95.8
10240 524288          0            0   0.0
12288 524288          0            0   0.0
14336 524288         33      1572864  68.4
16384 524288          0      1572864 100.0
2015-07-30 10:56:01 +02:00
Pekka Enberg
1626ec1986 log: Show log level when logging to stdout
Fixes #38.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-30 10:56:01 +02:00
Shlomi Livne
7edd1da287 Updates to allign with scylla
The are additional items that need to be updated and aligned:
token-vnodes, snitches, save_cached etc.

Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
2015-07-30 11:32:09 +03:00
Shlomi Livne
37ef045d55 Initial yaml taken from Origin 2.1.8
Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
2015-07-30 11:31:41 +03:00
Avi Kivity
54af3e2d27 messaging_service: stop rpc client before removing it
Instead of just destroying the client, stop() it first and wait for that
to complete.  Otherwise any connect in progress, or any requests in progress,
will access a destroyed object (in practice it will fail earlier when
the _stopped promise is destroyed without having been fulfilled).

Depends on rpc client stop patch.
2015-07-30 11:13:30 +03:00
Avi Kivity
e93bdbb4f0 Merge seastar upstream
* seastar 98c6bba...572ec2d (2):
  > rpc: implement client::stop()
  > dpdk: i40e_should_linearize(): Remove extra check outside the loop
2015-07-30 11:12:49 +03:00
Avi Kivity
40c51733d0 Merge "Implement missing fields for legacy_schema_tables" from Glauber
"Issue #8 mentions the fact that we are missing some fields in legacy_schema_tables.

After this patchset, the only one missing is the subcomparator. That one only exists
for super tables - which we don't support - and will be null otherwise: so we don't
really need it."
2015-07-30 08:24:05 +03:00
Glauber Costa
9887bc5f5f schema: support dropped columns
Because we don't support alter table, we won't have anyone actually manipulating this.
But we will set up so it appears properly as an empty map in queries.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-29 18:44:59 -04:00
Glauber Costa
f49eb92880 schema: speculative retry
When added to the schema and handled by legacy_schema_tables.cc, will then
appear correctly in the respective system tables.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-29 18:44:59 -04:00
Glauber Costa
438a3f8619 storage_proxy: move speculative_retry type to schema
It will be stored in the schema, so move there, where it belongs.  We'll need
to do more than just store a type, so provide a class that encapsulates it.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-29 18:44:59 -04:00
Glauber Costa
01e5fcad5e schema: memtable flush period
currently set to 0, which is Origin's default

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-29 18:44:59 -04:00
Avi Kivity
dce642f472 commitlog: fix use-after-free of file during close
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-07-29 20:36:03 +03:00
Raphael S. Carvalho
d791438a43 db: enable automatic compaction by default
So far, automatic compaction was disabled, but now that we support
size-tiered strategy, the default compaction strategy algorithm,
we could definitely enable automatic compaction by default.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-07-29 19:02:16 +03:00
Avi Kivity
c93bb0d16c Merge "retry policy for compaction" from Raphael 2015-07-29 11:24:23 +03:00
Avi Kivity
f749c98748 Merge "gossip: shadow round fix" from Asias 2015-07-29 11:10:41 +03:00
Asias He
f326704240 gossip: Drop unused code 2015-07-29 15:45:46 +08:00
Asias He
04e1cbfac7 storage_service: Enable check_for_endpoint_collision
We do a shadow gossip round to check if the ip address is used by
another node.
2015-07-29 15:41:52 +08:00
Asias He
782b78a4c7 gossip: Introduce handle_ack_msg helper
It is shared by shadow-round and non-shadow-round.
2015-07-29 15:16:01 +08:00
Asias He
2ab3033d5d gossip: Fix do_shadow_round
Add the sleep logic.
2015-07-29 15:16:01 +08:00
Asias He
d38deef499 gossip: Kill a FIMXE for knows_version 2015-07-29 11:25:38 +08:00
Asias He
471a964d8e gossip: Kill a FIXME for clone_with_higher_version 2015-07-29 11:15:52 +08:00