mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-23 18:20:50 +00:00
Fix ENOENT exception on current_batch.txt in DirectoryMonitor
current_batch.txt will not exist if there was no send, this is the case when all batches that was pending has been marked as pending.
This commit is contained in:
parent
c811e1f0d0
commit
889f54b549
@ -666,7 +666,10 @@ void StorageDistributedDirectoryMonitor::processFilesWithBatching(const std::map
|
||||
batch.send();
|
||||
}
|
||||
|
||||
Poco::File{current_batch_file_path}.remove();
|
||||
/// current_batch.txt will not exist if there was no send
|
||||
/// (this is the case when all batches that was pending has been marked as pending)
|
||||
if (Poco::File{current_batch_file_path}.exists())
|
||||
Poco::File{current_batch_file_path}.remove();
|
||||
}
|
||||
|
||||
bool StorageDistributedDirectoryMonitor::isFileBrokenErrorCode(int code)
|
||||
|
Loading…
Reference in New Issue
Block a user