See #259.
When transferring mutations between memtable and cache, lsa sometimes
runs out of memory. This solves the first two points, keeping reserve
filled up and adjusting the amount of reserve based on execution
history.
In some cases region may be in a state where it is not empty and
nothing could be evicted from it. For example when creating the first
entry, reclaimer may get invoked during creation before it gets
linked. We therefore can't rely on emptiness as a stop condition for
reclamation, the evction function shall signal us if it made forward
progress.
Related to #259. In some cases we need to allocate memory and hold
reclaim lock at the same time. If that region holds most of the
reclaimable memory, allocations inside that code section may
fail. allocating_section is a work-around of the problem. It learns
how big reserves shold be from past execution of critical section and
tries to ensure proper reserves before entering the section.
Some times we may close an empty active segment, if all data in it was
evicted. Normally segments are removed as soon as the last object in
it is freed, but if the segment is already empty when closed, noone is
supposed to call free on it. Such segments would be quickly reclaimed
during compaction, but it's possible that we will destroy the region
before they're reclaimed by compaction. Currently we would fail on an
assertion which checks that there are no segments. This change fixes
the problem by handling empty closed segments when region is
destroyed.
Memory releasing is invoked from destructors so should not throw. As a
consequence it should not allocate memory, so emergency segment pool
was switched from std::deque<> to an alloc-free intrusive stack.
Copying values may throw (std::bad_alloc for example), which will
result in a leak because destructor will not be called when
constructor throws.
May manifest as the following assertion failure:
utils/logalloc.cc:672: virtual logalloc::region_impl::~region_impl(): Assertion `_active->is_empty()' failed.
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>