]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mds: introduce ELid event to create/close log
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 7 Mar 2023 18:24:38 +0000 (13:24 -0500)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 1 Aug 2023 15:16:01 +0000 (11:16 -0400)
commit5a5374765441ee2db66a2ec5dcfea00ff57f9eab
treea2b31c1a2809714a882ab828272bd4a74ea9672d
parent553aa5e6cc76950f557b368cf92fce9494c91d63
mds: introduce ELid event to create/close log

Prior to this set of commits, the MDS would write the ESubtreeMap to the
journal, trim everything up to that segment, then finally force the
trimming of that last segment (`MDLog::trim(0)`). This is awkward in the
new code which preserves a major segment boundary at the beginning of
the journal during trimming. Instead of writing a special case for this
situation, it seems more natural to just use a new "lid" or "cap" event
to mark the beginning of the journal when no subtree map can yet be
written but we need sequence numbers to tie in other MDS tables.

Like ESegment, ELid doesn't actually contain any state. It's just a
marker for the beginning the log after rank deactivation or rank
creation. It can appear in the middle of the log if the shutdown
sequence is interrupted while writing the event but the MDS will skip it
during replay in that case.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/common/options/mds.yaml.in
src/mds/LogEvent.cc
src/mds/LogEvent.h
src/mds/MDCache.cc
src/mds/MDLog.cc
src/mds/MDLog.h
src/mds/MDSRank.cc
src/mds/events/ELid.h [new file with mode: 0644]
src/mds/journal.cc