mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
dbms: Server: feature development. [#METR-15090]
This commit is contained in:
parent
cdfb096f8f
commit
3459fdc01e
@ -43,6 +43,7 @@ private:
|
||||
iocb cb;
|
||||
std::vector<iocb *> request_ptrs;
|
||||
std::vector<io_event> events;
|
||||
size_t total_bytes_written = 0;
|
||||
int fd = -1; // file descriptor
|
||||
bool is_pending_write = false;
|
||||
bool got_exception = false;
|
||||
|
@ -91,7 +91,7 @@ void WriteBufferAIO::nextImpl()
|
||||
cb.aio_fildes = fd;
|
||||
cb.aio_buf = reinterpret_cast<UInt64>(flush_buffer.buffer().begin());
|
||||
cb.aio_nbytes = flush_buffer.offset();
|
||||
cb.aio_offset = 0;
|
||||
cb.aio_offset = total_bytes_written;
|
||||
cb.aio_reqprio = 0;
|
||||
|
||||
if ((cb.aio_nbytes % BLOCK_SIZE) != 0)
|
||||
@ -130,6 +130,7 @@ void WriteBufferAIO::waitForCompletion()
|
||||
got_exception = true;
|
||||
throw Exception("Asynchronous write error on file " + filename, ErrorCodes::AIO_WRITE_ERROR);
|
||||
}
|
||||
total_bytes_written += bytes_written;
|
||||
|
||||
is_pending_write = false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user