mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
Merge seastar upstream
* seastar 70aecca...ac02df7 (5): > Merge "Prefix preprocessor definitions" from Jesse > cmake: Do not enable warnings transitively > posix: prevent unused variable warning > build: Adjust DPDK options to fix compilation > io_scheduler: adjust property names DEBUG, DEFAULT_ALLOCATOR, and HAVE_LZ4_COMPRESS_DEFAULT macro references prefixed with SEASTAR_. Some may need to become Scylla macros.
This commit is contained in:
2
seastar
2
seastar
Submodule seastar updated: 70aecca3e0...ac02df7eac
@@ -513,7 +513,7 @@ SEASTAR_TEST_CASE(test_commitlog_counters) {
|
||||
});
|
||||
}
|
||||
|
||||
#ifndef DEFAULT_ALLOCATOR
|
||||
#ifndef SEASTAR_DEFAULT_ALLOCATOR
|
||||
|
||||
SEASTAR_TEST_CASE(test_allocation_failure){
|
||||
return cl_test([](commitlog& log) {
|
||||
|
||||
@@ -98,7 +98,7 @@ SEASTAR_THREAD_TEST_CASE(test_read_unsigned_vint) {
|
||||
static std::random_device rd;
|
||||
static std::mt19937 rng(rd());
|
||||
auto nr_tests =
|
||||
#ifdef DEBUG
|
||||
#ifdef SEASTAR_DEBUG
|
||||
10
|
||||
#else
|
||||
1000
|
||||
|
||||
@@ -138,7 +138,7 @@ static void test_random_ops(size_t size, std::random_device& rd ) {
|
||||
return bv[i];
|
||||
};
|
||||
size_t limit = size * 100;
|
||||
#ifdef DEBUG
|
||||
#ifdef SEASTAR_DEBUG
|
||||
limit = std::min<size_t>(limit, 20000);
|
||||
#endif
|
||||
for (size_t i = 0; i != limit; ++i) {
|
||||
|
||||
@@ -306,7 +306,7 @@ SEASTAR_TEST_CASE(test_merging) {
|
||||
});
|
||||
}
|
||||
|
||||
#ifndef DEFAULT_ALLOCATOR
|
||||
#ifndef SEASTAR_DEFAULT_ALLOCATOR
|
||||
SEASTAR_TEST_CASE(test_region_lock) {
|
||||
return seastar::async([] {
|
||||
region reg;
|
||||
@@ -1094,7 +1094,7 @@ SEASTAR_TEST_CASE(test_region_groups_basic_throttling_active_reclaim_no_double_r
|
||||
// Reproduces issue #2021
|
||||
SEASTAR_TEST_CASE(test_no_crash_when_a_lot_of_requests_released_which_change_region_group_size) {
|
||||
return seastar::async([] {
|
||||
#ifndef DEFAULT_ALLOCATOR // Because we need memory::stats().free_memory();
|
||||
#ifndef SEASTAR_DEFAULT_ALLOCATOR // Because we need memory::stats().free_memory();
|
||||
logging::logger_registry().set_logger_level("lsa", seastar::log_level::debug);
|
||||
|
||||
auto free_space = memory::stats().free_memory();
|
||||
@@ -1242,7 +1242,7 @@ SEASTAR_TEST_CASE(test_zone_reclaiming_preserves_free_size) {
|
||||
}
|
||||
|
||||
// No point in testing contiguous memory allocation in debug mode
|
||||
#ifndef DEFAULT_ALLOCATOR
|
||||
#ifndef SEASTAR_DEFAULT_ALLOCATOR
|
||||
SEASTAR_THREAD_TEST_CASE(test_can_reclaim_contiguous_memory_with_mixed_allocations) {
|
||||
prime_segment_pool(); // if previous test cases muddied the pool
|
||||
|
||||
|
||||
@@ -936,7 +936,7 @@ SEASTAR_TEST_CASE(test_update) {
|
||||
});
|
||||
}
|
||||
|
||||
#ifndef DEFAULT_ALLOCATOR
|
||||
#ifndef SEASTAR_DEFAULT_ALLOCATOR
|
||||
SEASTAR_TEST_CASE(test_update_failure) {
|
||||
return seastar::async([] {
|
||||
auto s = make_schema();
|
||||
|
||||
@@ -1617,7 +1617,7 @@ std::vector<char> cql_server::response::compress_lz4(const std::vector<char>& bo
|
||||
output[1] = (input_len >> 16) & 0xFF;
|
||||
output[2] = (input_len >> 8) & 0xFF;
|
||||
output[3] = input_len & 0xFF;
|
||||
#ifdef HAVE_LZ4_COMPRESS_DEFAULT
|
||||
#ifdef SEASTAR_HAVE_LZ4_COMPRESS_DEFAULT
|
||||
auto ret = LZ4_compress_default(input, output + 4, input_len, LZ4_compressBound(input_len));
|
||||
#else
|
||||
auto ret = LZ4_compress(input, output + 4, input_len);
|
||||
|
||||
@@ -325,7 +325,7 @@ struct segment {
|
||||
void record_free(size_type size);
|
||||
occupancy_stats occupancy() const;
|
||||
|
||||
#ifndef DEFAULT_ALLOCATOR
|
||||
#ifndef SEASTAR_DEFAULT_ALLOCATOR
|
||||
static void* operator new(size_t size) = delete;
|
||||
static void* operator new(size_t, void* ptr) noexcept { return ptr; }
|
||||
static void operator delete(void* ptr) = delete;
|
||||
@@ -371,7 +371,7 @@ struct segment_descriptor : public log_heap_hook<segment_descriptor_hist_options
|
||||
|
||||
using segment_descriptor_hist = log_heap<segment_descriptor, segment_descriptor_hist_options>;
|
||||
|
||||
#ifndef DEFAULT_ALLOCATOR
|
||||
#ifndef SEASTAR_DEFAULT_ALLOCATOR
|
||||
|
||||
// Segment pool implementation for the seastar allocator.
|
||||
// Stores segment descriptors in a vector which is indexed using most significant
|
||||
@@ -1481,7 +1481,7 @@ public:
|
||||
|
||||
inline void
|
||||
region_group_binomial_group_sanity_check(const region_group::region_heap& bh) {
|
||||
#ifdef DEBUG
|
||||
#ifdef SEASTAR_DEBUG
|
||||
bool failed = false;
|
||||
size_t last = std::numeric_limits<size_t>::max();
|
||||
for (auto b = bh.ordered_begin(); b != bh.ordered_end(); b++) {
|
||||
@@ -1862,7 +1862,7 @@ size_t tracker::impl::compact_and_evict_locked(size_t memory_to_release) {
|
||||
return mem_released;
|
||||
}
|
||||
|
||||
#ifndef DEFAULT_ALLOCATOR
|
||||
#ifndef SEASTAR_DEFAULT_ALLOCATOR
|
||||
|
||||
bool segment_pool::migrate_segment(segment* src, segment* dst)
|
||||
{
|
||||
@@ -2077,7 +2077,7 @@ allocating_section::guard::~guard() {
|
||||
shard_segment_pool.set_emergency_reserve_max(_prev);
|
||||
}
|
||||
|
||||
#ifndef DEFAULT_ALLOCATOR
|
||||
#ifndef SEASTAR_DEFAULT_ALLOCATOR
|
||||
|
||||
void allocating_section::reserve() {
|
||||
shard_segment_pool.set_emergency_reserve_max(std::max(_lsa_reserve, _minimum_lsa_emergency_reserve));
|
||||
|
||||
Reference in New Issue
Block a user