Commit Graph

6846 Commits

Author SHA1 Message Date
Raphael S. Carvalho
28ef8feffa tests: fix test for leveled compaction
test_setup::do_with_test_directory is missing. For some reason,
the test wasn't failing without it until now. Adding it is the
correct thing to do anyway.

Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com>
2015-10-19 17:07:08 +03:00
Avi Kivity
f4706c7050 Merge "initial support to leveled compaction" from Raphael
"This patchset introduces leveled compaction to Scylla.
We don't handle all corner cases yet, but we already have the strategy
and compaction working as expected. Test cases were written and I also
tested the stability with a load of cassandra-stress.

Leveled compaction may output more than one sstable because there is
a limit on the size of sstables. 160M by default.
Related to handling of partial compaction, it's still something to be
worked on.

Anyway, it will not be a big problem. Why? Suppose that a leveled
compaction will generate 2 sstables, and scylla is interrupted after
the first sstable is completely written but before the second one is
completely written. The next boot will delete the second sstable,
because it was partially written, but will not do anything with the
first one as it was completely written.
As a result, we will have two sstables with redundant data."
2015-10-19 16:17:45 +03:00
Gleb Natapov
156f760663 storage_proxy: drop Origin's truncate code from comment
Drop already translated code.
2015-10-19 14:06:06 +03:00
Gleb Natapov
ae42ec7832 storage_proxy: actually sort endpoints in get_live_sorted_endpoints() 2015-10-19 13:38:37 +03:00
Avi Kivity
75ab27f683 Revert "Merge "move dependencies to /opt/scylladb" from Takuya"
This reverts commit c96b0453f2, reversing
changes made to b862165279e70300d29a075dc913523d56a616d2; there were some
extra commits on that branch.
2015-10-19 13:31:51 +03:00
Avi Kivity
c96b0453f2 Merge "move dependencies to /opt/scylladb" from Takuya
"This moves all dependency packages to /opt/scylladb."
2015-10-19 13:28:39 +03:00
Takuya ASADA
14fab1e36d dist: use scylla-* dependency packages on scylla-server.spec 2015-10-19 09:11:22 +00:00
Takuya ASADA
39e17e04bc dist: move antlr3-C++-devel package to /opt/scylladb 2015-10-19 09:11:22 +00:00
Takuya ASADA
71182a0a95 dist: move antlr3-tool package to /opt/scylladb 2015-10-19 09:11:22 +00:00
Takuya ASADA
1c7d8bc0e9 dist: move ragel package to /opt/scylladb 2015-10-19 09:11:22 +00:00
Takuya ASADA
95c67a3e2e dist: move ninja-build package to /opt/scylladb, remove unused dependency for re2c 2015-10-19 09:11:22 +00:00
Takuya ASADA
ab8fe49b4f dist: move boost package to /opt/scylladb 2015-10-19 09:11:22 +00:00
Takuya ASADA
2c7861b7ed dist: move gcc package to /opt/scylladb 2015-10-19 09:11:22 +00:00
Takuya ASADA
23b69d610c dist: move isl package to /opt/scylladb 2015-10-19 09:11:22 +00:00
Takuya ASADA
6db2ddc53b dist: move binutils package to /opt/scylladb 2015-10-19 09:11:22 +00:00
Takuya ASADA
f06e50a569 dist: add scylla-env package for CentOS, to use /opt/scylladb as prefix 2015-10-19 09:11:22 +00:00
Calle Wilund
b862165279 commitlog_test: Modify test_allocation_failure to not require huge segment
Explicitly use up all the memory in the system as best as we can instead
Still not super reliable, but should have less side effects. And work better
with pre-allocated segment files
2015-10-19 11:32:35 +03:00
Avi Kivity
eed43b276c tests: use workspace-local directory for commitlog
Can't rely on default /var/lib/scylla to be there or accessible.
2015-10-19 10:21:16 +02:00
Tomasz Grabiec
19d7d30e67 Replace references to 'urchin' with 'scylla' 2015-10-19 11:08:05 +03:00
Takuya ASADA
ca43a5f2ca dist: dependency fix for ninja-build 2015-10-19 06:59:15 +00:00
Takuya ASADA
721d0f9f64 dist: fix srpm not found error 2015-10-19 06:52:48 +00:00
Takuya ASADA
78813d9617 dist: create rpmbuild dirs 2015-10-19 06:51:03 +00:00
Vlad Zolotarov
7492b662c8 locator::gossiping_property_file_snitch: do_withicate file descriptor in property_file_was_modified()
file::stat() requires "this" to be valid will the end of the call.

Fixes issue #464

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-10-19 06:51:03 +00:00
Vlad Zolotarov
8c4ce0efee locator::production_snitch_base: fix production_snitch_base signature
Make production_snitch_base constructor signature consistent with
the rest of production snitches.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-10-19 06:51:03 +00:00
Vlad Zolotarov
4b8b3e7841 locator::production_snitch_base: cleanup
Don't keep the file descriptor beyond load_property_file() scope.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-10-19 06:51:03 +00:00
Vlad Zolotarov
9dfc08cf9f locator::gossiping_property_file_snitch: use empty string as a default config file name
A non-empty default value of a configuration file name was preventing
the db::config::get_conf_dir() to kick in when a default snitch constructor
was used (this is the way it's always used from scylla).

Fixes issue #459

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-10-19 06:51:03 +00:00
Avi Kivity
ce046d07da tests: create directories for user column families as well 2015-10-19 06:51:03 +00:00
Avi Kivity
f63002a75e tests: initialize system keyspace (and its directories) for cql_test_env
Now that columnb familiy directories are not created on demand, the tests
started to fail.
2015-10-19 06:51:03 +00:00
Raphael S. Carvalho
dfc95587d6 db: do not ignore compaction strategy class
When building the in-memory schema for a column family, we were
ignoring compaction strategy class because of a bug in the
existing code. Example: suppose that you create a column family
with leveled compaction strategy. This option would be ignored
and the default strategy (size-tiered) would be used instead.
Found this problem while working on leveled compaction.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-10-19 06:51:03 +00:00
Glauber Costa
c8a6883987 sstables: remove outdated comment
We already write all components. The FIXME is fixed.

Signed-off-by: Glauber Costa <glommer@scylladb.com>
2015-10-19 06:51:03 +00:00
Avi Kivity
dd2bf81131 tests: disable collectd
No need to blast collectd metrics during test runs.
2015-10-19 09:05:48 +03:00
Avi Kivity
268f7acd11 Merge snitch fixes from Vlad
"This series cleans up a few places in the snitches
code that has been noticed during the work on issues #464
and #459.

The last patch actually fixes the issue #464"
2015-10-18 17:21:30 +03:00
Vlad Zolotarov
fe5e983152 locator::gossiping_property_file_snitch: do_withicate file descriptor in property_file_was_modified()
file::stat() requires "this" to be valid will the end of the call.

Fixes issue #464

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-10-18 16:58:27 +03:00
Vlad Zolotarov
15606fc8d3 locator::production_snitch_base: fix production_snitch_base signature
Make production_snitch_base constructor signature consistent with
the rest of production snitches.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-10-18 16:58:27 +03:00
Vlad Zolotarov
5712aa4d48 locator::production_snitch_base: cleanup
Don't keep the file descriptor beyond load_property_file() scope.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-10-18 16:58:27 +03:00
Vlad Zolotarov
f113a57ba1 locator::gossiping_property_file_snitch: use empty string as a default config file name
A non-empty default value of a configuration file name was preventing
the db::config::get_conf_dir() to kick in when a default snitch constructor
was used (this is the way it's always used from scylla).

Fixes issue #459

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-10-18 16:56:12 +03:00
Avi Kivity
bb67258c68 tests: create directories for user column families as well 2015-10-18 14:45:42 +03:00
Avi Kivity
9fd73417ae tests: initialize system keyspace (and its directories) for cql_test_env
Now that columnb familiy directories are not created on demand, the tests
started to fail.
2015-10-18 12:25:36 +03:00
Raphael S. Carvalho
a21af32eed db: do not ignore compaction strategy class
When building the in-memory schema for a column family, we were
ignoring compaction strategy class because of a bug in the
existing code. Example: suppose that you create a column family
with leveled compaction strategy. This option would be ignored
and the default strategy (size-tiered) would be used instead.
Found this problem while working on leveled compaction.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-10-18 11:06:37 +03:00
Glauber Costa
f1c681de60 sstables: remove outdated comment
We already write all components. The FIXME is fixed.

Signed-off-by: Glauber Costa <glommer@scylladb.com>
2015-10-17 15:28:55 +03:00
Avi Kivity
82f3f76e74 Merge "remove on-demand creation of SSTable directory" from Glauber
"Let's do it better and create the directories when the tables are first
created."
2015-10-17 15:23:56 +03:00
Glauber Costa
c814be253a sstables: no longer touch directory when writing SSTables
After the previous two patches, the CF directory where the SSTable will live is
guaranteed to always exist: system CFs' are touched at boot while newly created
tables' are touched when the creation mutations are announced.

With that in place, there is no more need for the recursive touch in the
SSTables path.

Signed-off-by: Glauber Costa <glommer@scylladb.com>
2015-10-17 13:08:07 +02:00
Glauber Costa
c3e68ad5a4 guarantee that CF directories exist for system tables
This is done in a single shard, so it lives in main.cc

Signed-off-by: Glauber Costa <glommer@scylladb.com>
2015-10-17 13:08:07 +02:00
Glauber Costa
e99e418238 schema_tables: make sure CF directory exists upon creation
In Cassandra, when you create a new column family, a directory for it
immediately appears under the KS directory.

In the past, we have made a decision to delay that creation until the first
SSTable is created, which works well in general.

There is a problem, however, for backup restoration: the standard procedure to
call loadNewSSTables is to do that in an empty directory. But the directory
simply won't be there until we create the first SSTable: bummer!

In the current incarnation of the code in schema_tables.cc, there is already
some code that runs on CPU0 only. That is a perfect place for the directory
creation. So let's do it.

After this patch, a directory for the CF appears right after the CF creation.

Signed-off-by: Glauber Costa <glommer@scylladb.com>
2015-10-17 13:08:07 +02:00
Glauber Costa
df857eb8c6 database: touch directories for the column family
Current code calls make_directory, which will fail if the directory already exists.
We didn't use this code path much before, but once we start creating CF directories
on CF creation - and not on SSTable creation, that will become our default method.

Use touch_directory instead

Signed-off-by: Glauber Costa <glommer@scylladb.com>
2015-10-17 13:08:07 +02:00
Raphael S. Carvalho
e555ad6370 tests: add tests for leveled compaction
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-10-16 01:57:08 -03:00
Raphael S. Carvalho
06e9836a66 wire up support for leveled compaction strategy
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-10-16 01:57:04 -03:00
Raphael S. Carvalho
35b75e9b67 adapt compaction procedure to support leveled strategy
Adapt our compaction code to start writing a new sstable if the
one being written reached its maximum size. Leveled strategy works
with that concept. If a strategy other than leveled is being used,
everything will work as before.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-10-16 01:54:52 -03:00
Raphael S. Carvalho
fbec0d0254 convert LeveledManifest to C++
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-10-16 01:46:15 -03:00
Raphael S. Carvalho
683e29e0bd tests: add test for range overlap
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-10-15 19:34:58 -03:00