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>
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.
Seastar builds DPDK by itself so there's no need to invoke make
ourselves. This ensures that the DPDK configuration we build is correct.
Spotted by Avi.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
There's no need to build tests as they're not shipped. Speed up RPM
generation by limiting build to the "scylla" executable.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Fix Scylla service startup issues on Fedora 21 by specifying an absolute
path for options file.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Use the newly added git-archive-all helper script for creating the
source tarball. This speeds up RPM building and makes things work on
Fedora 21 that doesn't support the "--exclude-vcs-ignores" command line
option for tar.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Fixes#99
Adding missing commitlog metrics to the rest API.
v2: Mis-send (clumsy fingers)
v3: Use map_reduce0 + subroutine for nicer code
v4: rebased on current master
v5: rebased yet again.
Since the _second_ file in this previous patch set was commited, and is
dependent on this very change below to even compile, some expediency might be
warranted.