MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / write

Method write

src/jrd/trace/TraceObjects.cpp:503–529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501};
502
503FB_SIZE_T TraceLogWriterImpl::write(const void* buf, FB_SIZE_T size)
504{
505 const FB_SIZE_T written = m_log.write(buf, size);
506 if (written == size)
507 return size;
508
509 if (!m_log.isFull())
510 return written;
511
512 ConfigStorage* storage = TraceManager::getStorage();
513 StorageGuard guard(storage);
514
515 TraceSession session(*getDefaultMemoryPool());
516 session.ses_id = m_sesId;
517 if (storage->getSession(session, ConfigStorage::FLAGS))
518 {
519 if (!(session.ses_flags & trs_log_full))
520 {
521 // suspend session
522 session.ses_flags |= trs_log_full;
523 storage->updateFlags(session);
524 }
525 }
526
527 // report successful write
528 return size;
529}
530
531FB_SIZE_T TraceLogWriterImpl::write_s(CheckStatusWrapper* status, const void* buf, FB_SIZE_T size)
532{

Callers

nothing calls this directly

Calls 4

getDefaultMemoryPoolFunction · 0.85
isFullMethod · 0.80
getSessionMethod · 0.80
updateFlagsMethod · 0.80

Tested by

no test coverage detected