You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by tv...@apache.org on 2020/11/05 02:58:50 UTC

[beam] 01/01: Remove an unused reference to staleTimerSet and reword the commentary.

This is an automated email from the ASF dual-hosted git repository.

tvalentyn pushed a commit to branch tvalentyn-patch-2
in repository https://gitbox.apache.org/repos/asf/beam.git

commit fc807f209dce46c18aed14da2abd11158bc16822
Author: tvalentyn <tv...@users.noreply.github.com>
AuthorDate: Wed Nov 4 18:57:55 2020 -0800

    Remove an unused reference to staleTimerSet and reword the commentary.
---
 website/www/site/content/en/blog/timely-processing.md | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/website/www/site/content/en/blog/timely-processing.md b/website/www/site/content/en/blog/timely-processing.md
index 440913f..01b4199 100644
--- a/website/www/site/content/en/blog/timely-processing.md
+++ b/website/www/site/content/en/blog/timely-processing.md
@@ -429,9 +429,9 @@ is intuitively simple: you want to wait a certain amount of time and then
 receive a call back.
 
 To put the finishing touches on our example, we will set a processing time
-timer as soon as any data is buffered. We track whether or not the timer has
-been set so we don't continually reset it. When an element arrives, if the
-timer has not been set, then we set it for the current moment plus
+timer as soon as any data is buffered. Note that we set the timer only when  
+the current buffer is empty, so that we don't continually reset the timer.
+When the first an element arrives, we set the timer for the current moment plus
 `MAX_BUFFER_DURATION`. After the allotted processing time has passed, a
 callback will fire and enrich and emit any buffered elements.
 
@@ -453,7 +453,6 @@ new DoFn<Event, EnrichedEvent>() {
       @TimerId("stale") Timer staleTimer,
       @TimerId("expiry") Timer expiryTimer) {
 
-    boolean staleTimerSet = firstNonNull(staleSetState.read(), false);
     if (firstNonNull(countState.read(), 0) == 0) {
       staleTimer.offset(MAX_BUFFER_DURATION).setRelative();
     }