Re: Question about PGMonitor::waiting_for_finished_proposal

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

 



On 06/01/2017 05:35 AM, 许雪寒 wrote:
Hi, everyone.

Recently, I’m reading the source code of Monitor. I found that, in
PGMonitor::preprare_pg_stats() method, a callback C_Stats is put into
PGMonitor::waiting_for_finished_proposal. I wonder, if a previous PGMap
incremental is in PAXOS's propose----accept phase at the moment C_Stats
is put into PGMonitor::waiting_for_finished_proposal, would this C_Stats
be called when that PGMap incremental's PAXOS procedure is complete and
PaxosService::_active() is invoked? If so, there exists the possibility
that a MPGStats request get responsed before going through the PAXOS
procedure.

Is this right? Thank you:-)

Much like the other PaxosServices, the PGMonitor will only handle requests with potential side-effects (i.e., updates) if the service is writeable.

A precondition on being writeable is not having a PGMonitor proposal currently in progress. Other proposals, from other PaxosServices, may be happening, but not from PGMonitor.

When your request reaches PGMonitor::prepare_pg_stats(), it is guaranteed (except in case of unexpected behavior) that the service is not currently undergoing a proposal.

This means that when we queue C_Stats waiting for a finished proposal, it will be called back upon once the next proposal finishes.

We may bundle other update requests to PGMonitor (much like what happens on other PaxosServices) into the same proposal. In which case, all the callbacks that were waiting for a finished proposal will be woken up once the proposal is finished.

So, to answer your question, no.

  -Joao

P.S.: If you are curious to know how the writeable decision is made, check out PaxosServices::dispatch().

_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




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


  Powered by Linux