41.4 SegmentQueue

The SegmentQueue is used to record the set of segments that need to be written to disk in order to flush the log.


class SegmentQueue
{
public:
    bool IsEmpty() const;
    void WriteToStream(xostream& os) const;
    void ReleaseSegmentsAndClearSQ();

public:
    std::deque<Segment*> fullSegments_;
    Segment* partiallyFullSegment_ = nullptr;
    int sizeOfPartiallyFullSegment_ = 0;
};