[ 
https://issues.apache.org/jira/browse/BEAM-8347?focusedWorklogId=337862&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-337862
 ]

ASF GitHub Bot logged work on BEAM-8347:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Nov/19 23:10
            Start Date: 03/Nov/19 23:10
    Worklog Time Spent: 10m 
      Work Description: drobert commented on issue #9820: [BEAM-8347]: 
Consistently advance UnboundedRabbitMqReader watermark
URL: https://github.com/apache/beam/pull/9820#issuecomment-549189280
 
 
   Update: after running some tests, the migration to the pull-based API in 
https://github.com/apache/beam/pull/9900 proves to be unsafe for this use case. 
I misread or misunderstood the semantics but it seems `channel.basicGet` blocks 
indefinitely, as opposed to returning immediately if there are no messages. 
This means if no new messages come in for a long period of time, the Runner 
will detect that the reader is 'stuck' since it's been on a single blocking 
call for so many minutes. Basically, we need to revert to a 
push-based-but-blocking API for this.
   
   *However* that is a separate issue from the watermarks advancing. I don't 
think that broken merge should block this PR once rebased. I'll have a separate 
PR to fix the other up shortly.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 337862)
    Time Spent: 2h 50m  (was: 2h 40m)

> UnboundedRabbitMqReader can fail to advance watermark if no new data comes in
> -----------------------------------------------------------------------------
>
>                 Key: BEAM-8347
>                 URL: https://issues.apache.org/jira/browse/BEAM-8347
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-rabbitmq
>    Affects Versions: 2.15.0
>         Environment: testing has been done using the DirectRunner. I also 
> have DataflowRunner available
>            Reporter: Daniel Robert
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> I stumbled upon this and then saw a similar StackOverflow post: 
> [https://stackoverflow.com/questions/55736593/apache-beam-rabbitmqio-watermark-doesnt-advance]
> When calling `advance()` if there are no messages, no state changes, 
> including no changes to the CheckpointMark or Watermark.  If there is a 
> relatively constant rate of new messages coming in, this is not a problem. If 
> data is bursty, and there are periods of no new messages coming in, the 
> watermark will never advance.
> Contrast this with some of the logic in PubsubIO which will make provisions 
> for periods of inactivity to advance the watermark (although it, too, is 
> imperfect: https://issues.apache.org/jira/browse/BEAM-7322 )
> The example given in the StackOverflow post is something like this:
>  
> {code:java}
> pipeline
>   .apply(RabbitMqIO.read()
>   .withUri("amqp://guest:guest@localhost:5672")
>   .withQueue("test")
>   .apply("Windowing", 
>     Window.<RabbitMqMessage>into(
>       FixedWindows.of(Duration.standardSeconds(10)))
>     .triggering(AfterWatermark.pastEndOfWindow())
>     .withAllowedLateness(Duration.ZERO)
>     .accumulatingFiredPanes()){code}
> If I push 2 messages into my rabbit queue, I see 2 unack'd messages and a 
> window that never performs an on time trigger.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to