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

Method switchActiveSegment

src/jrd/replication/ChangeLog.cpp:794–817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

792}
793
794void ChangeLog::switchActiveSegment()
795{
796 for (const auto segment : m_segments)
797 {
798 const auto segmentState = segment->getState();
799
800 if (segmentState == SEGMENT_STATE_USED)
801 {
802 if (segment->hasData())
803 {
804 const auto state = m_sharedMemory->getHeader();
805 fb_assert(segment->getSequence() == state->sequence);
806
807 segment->setState(SEGMENT_STATE_FULL);
808 state->flushMark++;
809
810 if (!m_shutdown)
811 m_workingSemaphore.release();
812 }
813
814 break;
815 }
816 }
817}
818
819void ChangeLog::bgArchiver()
820{

Callers

nothing calls this directly

Calls 6

getStateMethod · 0.45
hasDataMethod · 0.45
getHeaderMethod · 0.45
getSequenceMethod · 0.45
setStateMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected