MCPcopy Create free account
hub / github.com/apache/incubator-pegasus / write_commit

Method write_commit

src/runtime/rpc/rpc_message.cpp:426–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424}
425
426void message_ex::write_commit(size_t size)
427{
428 // printf("%p %s\n", this, __FUNCTION__);
429 CHECK(!this->_rw_committed,
430 "there are no pending msg write to be committed"
431 ", please invoke dsn_msg_write_next and dsn_msg_write_commit in pairs");
432
433 this->_rw_offset += (int)size;
434 *this->buffers.rbegin() = this->buffers.rbegin()->range(0, (int)this->_rw_offset);
435 this->_rw_committed = true;
436 this->header->body_length += (int)size;
437}
438
439bool message_ex::read_next(void **ptr, size_t *size)
440{

Callers 2

TESTFunction · 0.80
commit_bufferMethod · 0.80

Calls 2

rbeginMethod · 0.80
rangeMethod · 0.80

Tested by 1

TESTFunction · 0.64