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

Method write

src/DataStreams/RemoteBlockOutputStream.cpp:102–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101
102void RemoteBlockOutputStream::write(const Block & block)
103{
104 if (header)
105 assertBlocksHaveEqualStructure(block, header, "RemoteBlockOutputStream");
106
107 try
108 {
109 connection.sendData(block);
110 }
111 catch (const NetException &)
112 {
113 /// Try to get more detailed exception from server
114 auto packet_type = connection.checkPacket();
115 if (packet_type && *packet_type == Protocol::Server::Exception)
116 {
117 Packet packet = connection.receivePacket();
118 packet.exception->rethrow();
119 }
120
121 throw;
122 }
123}
124
125
126void RemoteBlockOutputStream::writePrepared(ReadBuffer & input, size_t size)

Callers

nothing calls this directly

Calls 5

checkPacketMethod · 0.80
sendDataMethod · 0.45
receivePacketMethod · 0.45
rethrowMethod · 0.45

Tested by

no test coverage detected