MCPcopy Create free account
hub / github.com/ByConity/ByConity / nextImpl

Method nextImpl

src/IO/WriteBufferFromFileDescriptorDiscardOnFailure.cpp:11–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9{
10
11void WriteBufferFromFileDescriptorDiscardOnFailure::nextImpl()
12{
13 size_t bytes_written = 0;
14 while (bytes_written != offset())
15 {
16 ssize_t res = ::write(fd, working_buffer.begin() + bytes_written, offset() - bytes_written);
17
18 if ((-1 == res || 0 == res) && errno != EINTR)
19 {
20 ProfileEvents::increment(ProfileEvents::CannotWriteToWriteBufferDiscard);
21 break; /// Discard
22 }
23
24 if (res > 0)
25 bytes_written += res;
26 }
27}
28
29}

Callers

nothing calls this directly

Calls 3

writeFunction · 0.50
incrementFunction · 0.50
beginMethod · 0.45

Tested by

no test coverage detected