MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / ~ChangeLog

Method ~ChangeLog

src/jrd/replication/ChangeLog.cpp:390–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390ChangeLog::~ChangeLog()
391{
392 m_shutdown = true;
393
394 m_workingSemaphore.release();
395 m_cleanupSemaphore.enter();
396
397 try
398 {
399 LockGuard guard(this);
400
401 if (unlinkSelf())
402 {
403 // We're the last owner going away, so mark the active segment as full.
404 // Then attempt archiving the full segments.
405
406 switchActiveSegment();
407
408 // At this point checkouts are disabled, thus it's safe
409 // to iterate through the segments without restarts
410
411 for (const auto segment : m_segments)
412 {
413 if (segment->getState() == SEGMENT_STATE_FULL)
414 archiveSegment(segment);
415 }
416
417 m_sharedMemory->removeMapFile();
418 }
419 }
420 catch (const Exception&)
421 {} // no-op
422
423 clearSegments();
424}
425
426void ChangeLog::initSharedFile()
427{

Callers

nothing calls this directly

Calls 4

removeMapFileMethod · 0.80
releaseMethod · 0.45
enterMethod · 0.45
getStateMethod · 0.45

Tested by

no test coverage detected