At line 243: appendInfo.firstOffset = nextOffset.get
If there is a gap between two message sets, then appendInfo.offsetsMonotonic will then catch it right? offsetsMonotonic On Mon, Sep 29, 2014 at 2:31 AM, Manjunath Shivakumar < manjunath.shivaku...@betfair.com> wrote: > Hi, > > But doesn't this check "!appendInfo.offsetsMonotonic" only ensure there > are no gaps > in the given message set. How do we ensure there are no gaps between this > message set > and previous logged offsets. > > Thanks, > Manju > > ---------- Forwarded message ---------- > From: Guozhang Wang <wangg...@gmail.com> > Date: 26 Sep 2014 17:34 > Subject: Re: Log.scala > To: "users@kafka.apache.org" <users@kafka.apache.org> > Cc: > > Hi Manjunath, > > This check "!appendInfo.offsetsMonotonic" makes sure that there will be no > gaps. > > And the other part "appendInfo.firstOffset < nextOffset.get" I agree that > it seems redundant. > > Guozhang > > On Fri, Sep 26, 2014 at 5:52 AM, Manjunath Shivakumar < > manjunath.shivaku...@betfair.com> wrote: > > > Also, would this check be redundant because of > > > > > https://github.com/apache/kafka/blob/7847e9c703f3a0b70519666cdb8a6e4c8e37c3a7/core/src/main/scala/kafka/log/Log.scala#L243 > > > > ________________________________________ > > From: Manjunath Shivakumar [manjunath.shivaku...@betfair.com] > > Sent: 26 September 2014 12:12 > > To: d...@kafka.apache.org > > Subject: Log.scala > > > > Hi Guys, > > > > Just looking at the following snippet > > > > > > > https://github.com/apache/kafka/blob/7847e9c703f3a0b70519666cdb8a6e4c8e37c3a7/core/src/main/scala/kafka/log/Log.scala#L259 > > > > Presumably this is when the follower is appending to its own log fetching > > from the leader. > > > > ( appendInfo.firstOffset < nextOffset.get ) > > > > Isn't the check slightly unsafe as it could lead to gaps in the offsets? > > > > Thanks, > > Manju > > > > ________________________________________________________________________ > > In order to protect our email recipients, Betfair Group use SkyScan from > > MessageLabs to scan all Incoming and Outgoing mail for viruses. > > > > ________________________________________________________________________ > > > > ________________________________________________________________________ > > In order to protect our email recipients, Betfair Group use SkyScan from > > MessageLabs to scan all Incoming and Outgoing mail for viruses. > > > > ________________________________________________________________________ > > > > > > -- > -- Guozhang > > ________________________________________________________________________ > In order to protect our email recipients, Betfair Group use SkyScan from > MessageLabs to scan all Incoming and Outgoing mail for viruses. > > ________________________________________________________________________ > -- -- Guozhang