mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 05:22:17 +00:00
Merge remote-tracking branch 'origin/startup-sanity-checks' into startup-sanity-checks
This commit is contained in:
commit
842c0b8ff0
@ -27,7 +27,7 @@ uint64_t getAvailableMemoryAmountOrZero()
|
|||||||
unsigned int usermem;
|
unsigned int usermem;
|
||||||
size_t len = sizeof(usermem);
|
size_t len = sizeof(usermem);
|
||||||
static int mib[2] = { CTL_HW, HW_USERMEM };
|
static int mib[2] = { CTL_HW, HW_USERMEM };
|
||||||
if (sysctl(mib, 2, &usermem, &len, NULL, 0) == 0 && len == sizeof(usermem))
|
if (sysctl(mib, 2, &usermem, &len, nullptr, 0) == 0 && len == sizeof(usermem))
|
||||||
return usermem;
|
return usermem;
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -35,13 +35,13 @@ enum class BlockDeviceType
|
|||||||
#if !defined(__linux__)
|
#if !defined(__linux__)
|
||||||
[[noreturn]]
|
[[noreturn]]
|
||||||
#endif
|
#endif
|
||||||
BlockDeviceType getBlockDeviceType([[maybe_unused]] const String & deviceId);
|
BlockDeviceType getBlockDeviceType([[maybe_unused]] const String & device_id);
|
||||||
|
|
||||||
// Get size of read-ahead in bytes for specified block device
|
// Get size of read-ahead in bytes for specified block device
|
||||||
#if !defined(__linux__)
|
#if !defined(__linux__)
|
||||||
[[noreturn]]
|
[[noreturn]]
|
||||||
#endif
|
#endif
|
||||||
UInt64 getBlockDeviceReadAheadBytes([[maybe_unused]] const String & deviceId);
|
UInt64 getBlockDeviceReadAheadBytes([[maybe_unused]] const String & device_id);
|
||||||
|
|
||||||
/// Returns mount point of filesystem where absolute_path (must exist) is located
|
/// Returns mount point of filesystem where absolute_path (must exist) is located
|
||||||
std::filesystem::path getMountPoint(std::filesystem::path absolute_path);
|
std::filesystem::path getMountPoint(std::filesystem::path absolute_path);
|
||||||
|
Loading…
Reference in New Issue
Block a user