From a2313bc7b6ef6a1a7885d3391762d6e7c92195f6 Mon Sep 17 00:00:00 2001 From: Shlomi Livne Date: Mon, 21 Sep 2015 00:11:43 +0300 Subject: [PATCH 1/3] dist: update ami base image id to one that supports enhanced networking Signed-off-by: Shlomi Livne --- dist/ami/scylla.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/ami/scylla.json b/dist/ami/scylla.json index 934cdb71ae..ed175e618b 100644 --- a/dist/ami/scylla.json +++ b/dist/ami/scylla.json @@ -8,7 +8,7 @@ "security_group_id": "{{user `security_group_id`}}", "region": "{{user `region`}}", "associate_public_ip_address": "{{user `associate_public_ip_address`}}", - "source_ami": "ami-d1b1c1b4", + "source_ami": "ami-a51564c0", "instance_type": "{{user `instance_type`}}", "ssh_username": "fedora", "ssh_timeout": "5m", From 07581178545351c8530dd498d9e4feb4ac0b5124 Mon Sep 17 00:00:00 2001 From: Shlomi Livne Date: Mon, 21 Sep 2015 00:14:46 +0300 Subject: [PATCH 2/3] dist: remove conflicts with cassandra21 to allow side by side rpm installation Signed-off-by: Shlomi Livne --- dist/redhat/scylla-server.spec.in | 3 --- 1 file changed, 3 deletions(-) diff --git a/dist/redhat/scylla-server.spec.in b/dist/redhat/scylla-server.spec.in index df4d8d8198..bb28a7a523 100644 --- a/dist/redhat/scylla-server.spec.in +++ b/dist/redhat/scylla-server.spec.in @@ -16,9 +16,6 @@ Requires: libaio boost-program-options boost-system libstdc++ boost-thread # TODO: create our own bridge device for virtio Requires: libvirt-daemon -Conflicts: cassandra21 -Provides: cassandra21 - %description %prep From 8085a0477102c01968f72f6c6f0c1951a4c58747 Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Mon, 21 Sep 2015 23:01:52 +0200 Subject: [PATCH 3/3] tests: Fix row_cache_alloc_stress Since row_cache::populate() uses allocating_section now, the trick with populating under relcaim lock no longer works, resulting in assertion failure inside allocating_section: row_cache_alloc_stress: utils/logalloc.hh:289: auto logalloc::allocating_section::operator()(logalloc::region&, Func&&) [with Func = row_cache::populate(const mutation&)::::]: Assertion `r.reclaiming_enabled()' failed. Use the trick with populating until eviction is detected by comapring region occupancy. --- tests/row_cache_alloc_stress.cc | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/tests/row_cache_alloc_stress.cc b/tests/row_cache_alloc_stress.cc index a494677d06..29a986b22e 100644 --- a/tests/row_cache_alloc_stress.cc +++ b/tests/row_cache_alloc_stress.cc @@ -121,15 +121,19 @@ int main(int argc, char** argv) { std::deque cache_stuffing; auto fill_cache_to_the_top = [&] { std::cout << "Filling up memory with evictable data\n"; - try { - logalloc::reclaim_lock _(tracker.region()); - while (true) { - auto m = make_small_mutation(); - cache_stuffing.push_back(m.decorated_key()); - cache.populate(m); + while (true) { + // Ensure that entries matching memtable partitions are evicted + // last, we want to hit the merge path in row_cache::update() + for (auto&& key : keys) { + cache.touch(key); + } + auto occupancy_before = tracker.region().occupancy().used_space(); + auto m = make_small_mutation(); + cache_stuffing.push_back(m.decorated_key()); + cache.populate(m); + if (tracker.region().occupancy().used_space() <= occupancy_before) { + break; } - } catch (const std::bad_alloc&) { - // expected } std::cout << "Shuffling..\n"; // Evict in random order to create fragmentation. @@ -137,6 +141,11 @@ int main(int argc, char** argv) { for (auto&& key : cache_stuffing) { cache.touch(key); } + // Ensure that entries matching memtable partitions are evicted + // last, we want to hit the merge path in row_cache::update() + for (auto&& key : keys) { + cache.touch(key); + } std::cout << "Free memory: " << memory::stats().free_memory() << "\n"; std::cout << "Cache occupancy: " << tracker.region().occupancy() << "\n"; }; @@ -162,12 +171,6 @@ int main(int argc, char** argv) { fill_cache_to_the_top(); - // Ensure that entries matching memtable partitions are evicted - // last, we want to hit the merge path in row_cache::update() - for (auto&& key : keys) { - cache.touch(key); - } - fragment_free_space(); cache.update(*mt, checker).get();