It was initially created to be the function to write all sstable
components, but later on, its purpose was only to write a few
components for testing. A similar function was created in the
tests, so now it can be removed.
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
We do serialization in transport/server.cc and there's no need for
the equals() and hashCode() function so just drop ifdef'd code.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
"This series implements CQL topology and status change events. We send
out all other events except for the "leave cluster" topology event which
doesn't have the relevant code converted in storage service.
This fixes#88 and fixes #89."
The last two arguments to vector::insert() are flipped which causes us
to fill the vector with 'b' bytes of value 0x01. Switch to the single
element insertion variant to fix the issue.
Spotted by dtest push notification tests.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
We need a container which can be used with compacting
allocators. "bytes" can't be used with compacting allocator because it
can't handle its external storage being moved.
This reverts commit 6b2be41df00bc42331eccd423b7031b345cf979d; tests should
work without a data directory, so let's find why they don't and fix it
instead.
ASan does not like commit 05c23c7f73
("database: Add create_keyspace_on_all() helper"):
==8112==WARNING: AddressSanitizer failed to allocate 0x7f88b84fc690 bytes
==8112==AddressSanitizer's allocator is terminating the process instead of returning 0
==8112==If you don't like this behavior set allocator_may_return_null=1
==8112==Sanitizer CHECK failed: ../../../../libsanitizer/sanitizer_common/sanitizer_allocator.cc:147 ((0)) != (0) (0, 0)
I was not able to determine the source of the bug. Make ASan happy by
reverting the code movement and using the "cpu zero" trick we use for
table creation.
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
gcc 4.9 fails to compiles the following legal code (which compiles fine on
gcc 5.1):
#include <unordered_set>
std::unordered_set<int> hi() {
return {};
}
Work around this problem to make Scylla compile on gcc 4.9 again.
Note that this bug is specific to std::unordered_set - we have other places
in the code code which "return {}" for std::set, and those work fine.
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
It is needed for db.get_version(). I really hated to pass &db everywhere
If we had a global helper function like get_local_db(), life will be much
easier.
Use seastar::async to simplify the code. This code is only executed
during boot up, so it is fine to use seastar::async.
More commented out code are enabled.