Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion be/src/common/daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void Daemon::tcmalloc_gc_thread() {
}
}

int release_rate_index = memory_pressure / 10;
int release_rate_index = static_cast<int>(memory_pressure / 10);
double release_rate = 1.0;
if (release_rate_index >= sizeof(release_rates) / sizeof(release_rates[0])) {
release_rate = 2000.0;
Expand Down
6 changes: 6 additions & 0 deletions be/src/io/cache/block_file_cache_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
#endif

#include <algorithm>
#if !defined(__APPLE__)
#include <execution>
#endif
#include <ostream>
#include <utility>

Expand Down Expand Up @@ -159,7 +161,11 @@ FileCacheFactory::get_query_context_holders(const TUniqueId& query_id) {
std::string FileCacheFactory::clear_file_caches(bool sync) {
std::vector<std::string> results(_caches.size());

#if defined(__APPLE__)
std::for_each(_caches.begin(), _caches.end(), [&](const auto& cache) {
#else
std::for_each(std::execution::par, _caches.begin(), _caches.end(), [&](const auto& cache) {
#endif
size_t index = &cache - &_caches[0];
results[index] =
sync ? cache->clear_file_cache_directly() : cache->clear_file_cache_async();
Expand Down
2 changes: 1 addition & 1 deletion be/src/util/disk_info_mac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void DiskInfo::get_device_names() {
auto it = major_to_disk_id.find(major(dev));
int disk_id;
if (it == major_to_disk_id.end()) {
disk_id = _s_disks.size();
disk_id = static_cast<int>(_s_disks.size());
major_to_disk_id[major(dev)] = disk_id;

std::string name = "disk" + std::to_string(disk_id);
Expand Down
2 changes: 1 addition & 1 deletion be/src/util/mem_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class MemInfo {
#if !defined(__APPLE__) || !defined(_POSIX_C_SOURCE)
return getpagesize();
#else
return vm_page_size;
return static_cast<int>(vm_page_size);
#endif
}

Expand Down
Loading