On Wed, Feb 24, 2021 at 9:10 AM 조규진 <bori19...@snu.ac.kr> wrote:
>
> Hi.
>
> I'm a newbie in CephFS and I have some questions about how per-MDS journals
> work.
> In Sage's paper (osdi '06), I read that each MDSs has its own journal and
> it lazily flushes metadata modifications on OSD cluster.
> What I'm wondering is that some directory operations like rename work with
> multiple metadata and It may work on two or more MDSs and their journals,
> so I think it needs some mechanisms to construct a transaction that works
> on multiple journals like some distributed transaction mechanisms.
>
> Could anybody explains how per-MDS journals work in such directory
> operations? or recommends some references about it?

Your intuition is correct: these transactions span multiple MDS journals.

The code for this stuff is somewhat long, in src/mds/Server.cc, but
here are a couple of pointers if you're interested in untangling it:
- Server::handle_client_rename is the entry point
- The MDS which handles the client request sends MMDSPeerRequest
messages to peers in rename_prepare_witness, and waits for
acknowledgements before writing EUpdate events to its journal
- The peer(s) write EPeerUpdate(OP_PREPARE) events to their journals
during prepare, and EPeerUpdate(OP_COMMIT) after the first MDS has
completed.

John



>
> Thanks.
> kyujin.
> _______________________________________________
> ceph-users mailing list -- ceph-users@ceph.io
> To unsubscribe send an email to ceph-users-le...@ceph.io
_______________________________________________
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io

Reply via email to