Re: MDS: what's the purpose of using LogEvent with empty metablob?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 15, 2020 at 9:40 AM Xinying Song <songxinying.ftd@xxxxxxxxx> wrote:
>
> Hi, Greg:
> Thanks for your reply!
> I think master can always know if a request has been finished or not
> no matter whether
> there is a Commit-logevent, because it has written a EUpdate logevent
> that records the
> unfinished request.
>
> Of course, we need to do commit, in which we clean up mdcache and
> trigger journal trim,
> but it seems we don't need to write a logevent. We can do commit just in memory.
>
> For example, if we remove writing a ESlaveUpdate::OP_COMMIT logevent on slave,
> when crash happens, master will know there is an unfinished request
> either by replaying
> its early logged EUpdate or reading from its cache, so it resends

log event can be trimmed, cache get lost if master crashed


> OP_FINISH to slave,
> then everything will go on.
> Similarly, if we remove writing a ECommitted logevent on master, when
> crash happens,
> master still knows there is an unfinished request and it will restart
> the process from the
> step of sending OP_FINISH to slave.
>
> What do you think?
>
> Sincerely
> -Xinying
>
> Gregory Farnum <gfarnum@xxxxxxxxxx> 于2020年4月15日周三 上午2:16写道:
> >
> > On Sun, Apr 12, 2020 at 5:19 AM Xinying Song <songxinying.ftd@xxxxxxxxx> wrote:
> > >
> > > Hi, cephers:
> > > What's the purpose of using LogEvent with empty metablob?
> > > For example in link/unlink operation cross two active mds,
> > > when slave receives OP_FINISH it will write an ESlaveUpdate::OP_COMMIT
> > > to the journal, then
> > > send OP_COMMITTED to master. When master receives OP_COMMITTED it will
> > > write an ECommitted to the journal then allow previously logged
> > > journal to be trimmed.
> > >
> > > Why are these two logevents necessary?
> > > I guess they are originally used for a scene that crashes happen,
> > > but in my opinion it seems not necessary. For example,
> > > if cash happens, after failed mds are brought up again, in resolve
> > > stage, master will resend OP_FINISH to slave, then things will
> > > continue as expected.
> >
> > I don't remember the details of these transactions off the top of my
> > head, but it sounds like you just answered your question: how would
> > the master know it needs to tell the slave things are over or not, if
> > it doesn't commit that it told the slave things are over?
> > If we don't commit something indicating a finish, we'd need to
> > remember the transaction forever, which would be bad.
> > -Greg
> >
> > >
> > > Could anyone give some tips on this doubt?
> > >
> > > Sincerely thanks!
> > > _______________________________________________
> > > ceph-users mailing list -- ceph-users@xxxxxxx
> > > To unsubscribe send an email to ceph-users-leave@xxxxxxx
> > >
> >
> _______________________________________________
> ceph-users mailing list -- ceph-users@xxxxxxx
> To unsubscribe send an email to ceph-users-leave@xxxxxxx
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux