mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 13:42:02 +00:00
Fix
This commit is contained in:
parent
24e015b961
commit
a96c1ea86f
@ -381,7 +381,7 @@ void FileSegment::write(const char * from, size_t size, size_t offset)
|
||||
const auto file_size = fs::file_size(file_segment_path);
|
||||
chassert(downloaded_size <= file_size);
|
||||
chassert(reserved_size >= file_size);
|
||||
chassert(file_size <= range().right + 1);
|
||||
chassert(file_size <= range().size());
|
||||
if (downloaded_size != file_size)
|
||||
downloaded_size = file_size;
|
||||
}
|
||||
|
@ -370,8 +370,8 @@ KeyMetadata::iterator LockedKey::removeFileSegment(size_t offset, const FileSegm
|
||||
bool exists = fs::exists(path);
|
||||
if (exists)
|
||||
{
|
||||
LOG_TEST(log, "Removed file segment at path: {}", path);
|
||||
fs::remove(path);
|
||||
LOG_TEST(log, "Removed file segment at path: {}", path);
|
||||
}
|
||||
else if (file_segment->downloaded_size)
|
||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "Expected path {} to exist");
|
||||
|
Loading…
Reference in New Issue
Block a user