Merge pull request #64502 from rschu1ze/nsync-bye-bye-bye

Sync some code back from internal to public repository
This commit is contained in:
Robert Schulze 2024-05-29 12:06:05 +00:00 committed by GitHub
commit 4bafca4dc6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 25 deletions

View File

@ -274,6 +274,11 @@ bool CachedOnDiskReadBufferFromFile::canStartFromCache(size_t current_offset, co
return current_write_offset > current_offset;
}
String CachedOnDiskReadBufferFromFile::toString(ReadType type)
{
return String(magic_enum::enum_name(type));
}
CachedOnDiskReadBufferFromFile::ImplementationBufferPtr
CachedOnDiskReadBufferFromFile::getReadBufferForFileSegment(FileSegment & file_segment)
{

View File

@ -129,19 +129,7 @@ private:
ReadType read_type = ReadType::REMOTE_FS_READ_BYPASS_CACHE;
static String toString(ReadType type)
{
switch (type)
{
case ReadType::CACHED:
return "CACHED";
case ReadType::REMOTE_FS_READ_BYPASS_CACHE:
return "REMOTE_FS_READ_BYPASS_CACHE";
case ReadType::REMOTE_FS_READ_AND_PUT_IN_CACHE:
return "REMOTE_FS_READ_AND_PUT_IN_CACHE";
}
UNREACHABLE();
}
static String toString(ReadType type);
size_t first_offset = 0;
String nextimpl_step_log_info;

View File

@ -15,18 +15,7 @@ namespace DB
static String typeToString(FilesystemCacheLogElement::CacheType type)
{
switch (type)
{
case FilesystemCacheLogElement::CacheType::READ_FROM_CACHE:
return "READ_FROM_CACHE";
case FilesystemCacheLogElement::CacheType::READ_FROM_FS_AND_DOWNLOADED_TO_CACHE:
return "READ_FROM_FS_AND_DOWNLOADED_TO_CACHE";
case FilesystemCacheLogElement::CacheType::READ_FROM_FS_BYPASSING_CACHE:
return "READ_FROM_FS_BYPASSING_CACHE";
case FilesystemCacheLogElement::CacheType::WRITE_THROUGH_CACHE:
return "WRITE_THROUGH_CACHE";
}
UNREACHABLE();
return String(magic_enum::enum_name(type));
}
ColumnsDescription FilesystemCacheLogElement::getColumnsDescription()