failure_detector::{interpret, force_conviction} will call into callback: convict
, which might start an async operation. Protect it by ref count.
Fixes#269
We have this call chain,
gossiper::run -> do_status_check -> interpret -> convict -> mark_dead
since gossip::run is executed inside a seastar thread, we can assure all
functions above run inside a seastar thread.
There are three places where async operations can be scheduled
- gossiper timer handler
- API called by user
- messaging service handler
Use reference tracking infrastructure to protect.
Fixes#268
It's a singleton, so we can't attempt to init it more than once.
Fixes cql_query_test failure:
/home/tgrabiec/src/urchin2/seastar/core/future.hh:315: void future_state<>::set(): Assertion `_u.st == state::future' failed.
unknown location(0): fatal error in "test_create_table_statement": signal: SIGABRT (application abort requested)
seastar/tests/test-utils.cc(31): last checkpoint
Fixes complaint about ignored result:
utils/file_lock.cc: In destructor 'utils::file_lock::impl::~impl()':
utils/file_lock.cc:29:33: error: ignoring return value of 'int lockf(int, int, __off_t)', declared with attribute warn_unused_result [-Werror=unused-result]
When row consumer fallthrough from ATOM_NAME_BYTES to ATOM_MASK,
we assume that mask can be consumed, but it may happen that
data.size() equals to zero, thus mask cannot be consumed.
Solution is to add read_8 so that the code will only fallthrough
if mask can be consumed right away.
Fixes#197.
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
Align with origin CQL boot message
Resolves an issue when starting a cluster with CCM - wait till all
servers have openned their CQL port
Fixes#39
Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
Collection cells in query results are serialized using the "mutation form",
and must be deserialized using that format as well.
Fixes "--logger-log-level storage_proxy=trace" crasher.
Pointer to messageing_service object is stored in each request
continuation, so the object destruction should not happen while
any of these continuations is scheduled. Use shared pointer instead.
Fixes#273.
"This series changes build_rpm.sh to use mock which ensures RPM is built
in a clean chroot environment:
https://fedoraproject.org/wiki/Mock
Build steps are document in README.md file."
"This series deals with copies and moves of mutation. The former are dealt
with by adding std::move() and missing 'mutable' (in case of lambdas). The
latter are improved by storing mutation_partition externally thus removing
the need for moving mutation_partition each time mutation is moved.
Storing mutation_partition externally is obviously trading the cost of
move constructor for the cost of allocation which shows in perf_mutation
results since mutations aren't moved in that test.
perf_mutation (-c 1):
before: 3289520.06 tps
after: 3183023.37 tps
diff: -3.24%
perf_simple_query (read):
before: 526954.05 tps
after: 577225.16 tps
diff +9.54%
perf_simple_query (write):
before: 731832.70 tps
after: 734923.60 tps
diff: +0.42%
Fixes#150 (well, not completely)."
Our C++ compilation takes up so much memory that we cannot really use
RPM defaults. Limit the number of jobs to 2 for now to fix SIGBUS errors
in VMs as well as swap storm when building with mock.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Fixes the following build error in clean Fedora chroot when building
with mock:
/var/tmp/rpm-tmp.xx23K7: ./configure.py: /usr/bin/python3: bad interpreter: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.xx23K7 (%build)
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
By passing mutation_partition oither by const ref or rref instead of
by value one move can be avoided if copying is necessary.
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
Add in repair another info message, "Endpoints ... and ... have ... range(s)
out of sync for <column-family>", which the repair dtest expects.
This patch is a kind of silly attempt to appease issue #81 (should we mark
it fixed?). It's kind of silly, because without merkle trees (see issue #82),
we really have no way of knowing if there's any differences between the two
nodes, so we always say there is "1 range" difference. So if the dtest expects
such a message *not* to appear (because there are no differences), it might
fail.
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
As requested in issue #79, this patch ensures that if the user attempts
to pass an unknown repair option, the operation fails rather than the
option simply be ignored.
An "unknown repair option" may be one of Cassandra's options we don't yet
support ("parallelism", "incremental", "jobThreads", "columnFamilies",
"dataCenters", "hosts" and "trace"), or any other unknown option name -
in either case, the operation will fail rather than ignore the option
which might have been important.
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Fixes#266
Some callsites are fine: if we just get the message and process it, as is the
case with check_health for instance, msg will be alive and all is good. But if
we return a future inside the processing, msg must be kept alive. Classic bug,
appearing again.
Pekka saw this in practice in another bug. We haven't seen anything that is
related to this, but it is certainly wrong.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
If an exception happens in the query path, we'll never know about it. They are
currently being ignored.
Investigating this, I found out that this is because the readers in
storage_proxy.cc handles them - but don't log they anywhere.
This patch introduces such logging. the error() function takes an sstring not
an exception_ptr: this is so we can reuse it in the future to also log problems
from other hosts (currently not done).
We have a separate helper to extract the message from the current exception
before we pass it to error()
Fixes#110
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
* seastar 3e4a237...cb905f6 (8):
> sharded: introduce get_local_service() function
> test: add reference tracking test to distributed test
> sharded: reference tracking infrastructure
> sharded: do not capture remote service pointer on remote invocation lambda (part 2)
> build: put user cflags after default cflags
> Revert "memory: simplify new (nothrow) variants"
> build: drop unused dpdk libraries
> memory: simplify new (nothrow) variants
buf is a stack variable, so it may be destroyed by the time it's
used by output_stream::write().
Spotted while auditing the code.
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
This patch tests that collection within a mutation behave properly.
That is what lead to #188.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
The reader has a field for the sstable, but we are not initializing it, so it
can be destroyed before we finish our job. It seems to work here, but transposing
this code to the test case crashed it. So this means at some point we will crash
here as well.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
The sstable mutation_reader knows how to handle the case of multiple
mutations: it wraps the mutation into an optional element, and when a
new mutation comes along, it just moves that to the caller.
However, it fails to do the same for collections. We have the same collection
tracking structure, and as long as we are trying to read a single row, all
works fine.
When we are reading more than a row, though, things change: because we have
stale data for the previous collection, the new one will end up including this.
In the case in which we tested, we had an sstable that contained mutations for
all columns in a row, and another row containing all columns but one, and that
one was precisely a collection. What we ended up seeing, is that the new row
would have that collection nevertheless, with the former row's collection
value.
This patch applies the same method as we use for tracking mutations, to tracking
collections. And with this, it all works.
Fixes#188
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Since commit 870e9e5729 eviction no
longer happens during allocation from a region and batch size of 30000
became too large to handle. 3000 is low enough and that test case was
left.
Disabling compaction of a region is currently done in order to keep
the references valid. But disabling only compaction is not enough, we
also need to disable eviction, as it also invalidates
references. Rather than introducing another type of lock, compaction
and eviction are controlled together, generalized as "reclaiming"
(hence the reclaim_lock).
"Fix various issues in the Scylla RPM spec file and support scripts:
- Include scylla.conf in the RPM
- Fix tarball generation on Fedora 21
- Fix scylla user home directory
- Simplify DPDK build
Scylla RPM now builds and runs on Fedora 21 with DPDK manually disabled
as I don't have matching kernel headers installed on my machine.
Fixes #245."
It relies on the fact that the process has a fixed amount of memory
assigned and std::bad_alloc is thrown in a timely manner when it fills
up, which is the case for seastar's allocator, but not with the
default allocator. With the latter the OOM killer kills the process.