All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ning Yao <zay11022@gmail.com>
To: Samuel Just <sjust@redhat.com>
Cc: ceph-devel <ceph-devel@vger.kernel.org>
Subject: Re: About BUG #16279
Date: Tue, 6 Sep 2016 18:35:18 +0800	[thread overview]
Message-ID: <CALZt5jziM6jvisL0cnK1RmHQQ+dgwDrnD8VotTUCcJAs8zUuqQ@mail.gmail.com> (raw)
In-Reply-To: <CAN=+7FUwtmZYQ0wf4Juo5s9-QMpN7HBbehk+7mCY+qxRuhdKRw@mail.gmail.com>

So I think the notation in the code is misunderstanding?

Or the code to get list<pg_log_entry_t> divergent in merge_log is wrong?

    // move aside divergent items
    list<pg_log_entry_t> divergent;
    while (!log.empty()) {
      pg_log_entry_t &oe = *log.log.rbegin();
      /*
       * look at eversion.version here.  we want to avoid a situation like:
       *  our log: 100'10 (0'0) m 10000004d3a.00000000/head by
client4225.1:18529
       *  new log: 122'10 (0'0) m 10000004d3a.00000000/head by
client4225.1:18529
       *  lower_bound = 100'9
       * i.e, same request, different version.  If the eversion.version is > the
       * lower_bound, we it is divergent.
       */
      if (oe.version.version <= lower_bound.version)
break;
      dout(10) << "merge_log divergent " << oe << dendl;
      divergent.push_front(oe);
      log.log.pop_back();
    }

As the logic above,  divergent will contain all log_entry whose
version is the same in olog and log?
Regards
Ning Yao


2016-09-02 23:50 GMT+08:00 Samuel Just <sjust@redhat.com>:
> On Thu, Sep 1, 2016 at 7:44 PM, Ning Yao <zay11022@gmail.com> wrote:
>> Hi, all
>>
>> we got the same issue http://tracker.ceph.com/issues/16279
>>
>> I think it is possible objiter->second->version == last_divergent_update?
>>
>> If olog is [200'5 ~ 200'10, 202'11~ 202'20] with object A: [200'5, 200'8]
>>    log is [200'3 ~ 200'11], object A : [200'5, 200'8]
>>
>> Then after merge log os [200'3 ~ 200'10, 202'11~202'20] with divergent entry:
>> object A: 200'5 and 200'8
>
> I think I'm misunderstanding your notation, but if I'm reading this
> right, the entries at 200'5 and 200'8 would *not* be divergent -- the
> only divergent entry would be 200'11.
>
>>
>> first_divergent_update will be 200'5 and last_divergent_update will be
>> 200'8 for object A. If can find it in current log, and the possible
>> version the object A is equal or greater than 200'8.  So I am not sure
>> it must be greater than last_divergent_update but may be equal?
>>
>> Am I missing something else?
>>
>> Regards
>> Ning Yao
>> --
>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-09-06 10:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02  2:44 About BUG #16279 Ning Yao
2016-09-02 15:50 ` Samuel Just
2016-09-06 10:35   ` Ning Yao [this message]
2016-09-06 14:32     ` Samuel Just

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=CALZt5jziM6jvisL0cnK1RmHQQ+dgwDrnD8VotTUCcJAs8zUuqQ@mail.gmail.com \
    --to=zay11022@gmail.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=sjust@redhat.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.