mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-09 08:23:29 +00:00
Merge branch 'branch-0.9'
tests: Fix row_cache_alloc_stress
dist: remove conflicts with cassandra21 to allow side by side rpm installation
dist: update ami base image id to one that supports enhanced networking
This commit is contained in:
2
dist/ami/scylla.json
vendored
2
dist/ami/scylla.json
vendored
@@ -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",
|
||||
|
||||
3
dist/redhat/scylla-server.spec.in
vendored
3
dist/redhat/scylla-server.spec.in
vendored
@@ -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
|
||||
|
||||
@@ -121,15 +121,19 @@ int main(int argc, char** argv) {
|
||||
std::deque<dht::decorated_key> 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();
|
||||
|
||||
Reference in New Issue
Block a user