All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sage Weil <sage@newdream.net>
To: Ning Yao <zay11022@gmail.com>
Cc: Haomai Wang <haomaiwang@gmail.com>, Xinze Chi <xmdxcxz@gmail.com>,
	"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: crc error when decode_message?
Date: Tue, 17 Mar 2015 06:46:13 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1503170643410.7043@cobra.newdream.net> (raw)
In-Reply-To: <CALZt5jyiiM2NcurGLSVYYkNn+bPuwhWX8+zb0bBndKQ92p2KNg@mail.gmail.com>

On Tue, 17 Mar 2015, Ning Yao wrote:
> 2015-03-16 22:06 GMT+08:00 Haomai Wang <haomaiwang@gmail.com>:
> > On Mon, Mar 16, 2015 at 10:04 PM, Xinze Chi <xmdxcxz@gmail.com> wrote:
> >> How to process the write request in primary?
> >>
> >> Thanks.
> >>
> >> 2015-03-16 22:01 GMT+08:00 Haomai Wang <haomaiwang@gmail.com>:
> >>> AFAR Pipe and AsyncConnection both will mark self fault and shutdown
> >>> socket and peer will detect this reset. So each side has chance to
> >>> rebuild the session.
> >>>
> >>> On Mon, Mar 16, 2015 at 9:19 PM, Xinze Chi <xmdxcxz@gmail.com> wrote:
> >>>> Such as, Client send write request to osd.0 (primary), osd.0 send
> >>>> MOSDSubOp to osd.1 and osd.2
> >>>>
> >>>> osd.1 send reply to osd.0 (primary), but accident happened:
> >>>>
> >>>> 1. decode_message crc error when decode reply msg
> >>>> or
> >>>> 2. the reply msg is lost when send to osd.0, so osd.0 do not receive replay msg
> >>>>
> >>>> Could anyone tell me what is the behavior if osd.0 (primary)?
> >>>>
> >
> > osd.0 and osd.1 both will try to reconnect peer side, and the lost
> > message will be resend to osd.0 from osd.1
> So I wonder if different routing path delays the arrival of one
> message, then the in_seq would be setting ahead, then based on the
> logic. Later, if the delaying message arrives, it will be dropping and
> discard. Thus, if it is just a sub_op reply message as xinze
> describes, how ceph works after that? It seems repop of the write Op
> will be waiting infinite times until the osd restart?

These sorts of scenarios are why src/msg/simple/Pipe.cc (an in particular, 
accept()) is not so simple.  The case you describe is 

 https://github.com/ceph/ceph/blob/master/src/msg/simple/Pipe.cc#L492
or
 https://github.com/ceph/ceph/blob/master/src/msg/simple/Pipe.cc#L492

In other words, this is all masked by the Messenger layer so that the 
higher layers (OSD.cc etc) see a single, ordered, reliable stream of 
messages and all of the failure/retry/reconnect logic is hidden.

sage

  reply	other threads:[~2015-03-17 13:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-16 12:02 crc error when decode_message? Xinze Chi
2015-03-16 13:19 ` Xinze Chi
2015-03-16 14:01   ` Haomai Wang
2015-03-16 14:04     ` Xinze Chi
2015-03-16 14:06       ` Haomai Wang
2015-03-17  7:23         ` Ning Yao
2015-03-17 13:46           ` Sage Weil [this message]
2015-03-17 13:58             ` Gregory Farnum
2015-03-18  2:52               ` Ning Yao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.00.1503170643410.7043@cobra.newdream.net \
    --to=sage@newdream.net \
    --cc=ceph-devel@vger.kernel.org \
    --cc=haomaiwang@gmail.com \
    --cc=xmdxcxz@gmail.com \
    --cc=zay11022@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.