oscerd opened a new pull request, #25352:
URL: https://github.com/apache/camel/pull/25352

   `GoogleCalendarStreamConsumer` could silently skip events when 
`considerLastUpdate=true`:
   
   ```java
   if (!dateList.isEmpty()) {
       ...
       calendar.add(java.util.Calendar.SECOND, 1);
       finalLastUpdate = calendar.getTime();
   } else {
       finalLastUpdate = new Date();          // empty poll
   }
   ```
   
   * **An empty poll moved the cursor to the local clock.** Everything modified 
between the previous
     poll and that moment was then filtered out by `updatedMin` and never 
delivered — and the value
     came from the local clock, so any skew against Google's timestamps widened 
the gap.
   * **A non-empty poll moved the cursor one second past the newest event**, 
dropping anything modified
     within that same second.
   
   The cursor is now the update time of the newest event that was actually 
delivered, and it only moves
   when something was delivered. Because `updatedMin` is inclusive, the ids of 
the events seen at that
   exact instant are remembered and skipped on the next poll, so nothing is 
delivered twice and nothing
   in that instant is lost. The bookkeeping lives in 
`selectUndeliveredAndMoveCursor`, which the new
   test drives directly.
   
   Two more fixes in the same class:
   
   * The invalid-sync-token path (HTTP 410) called `return poll();` — unbounded 
self-recursion if the
     server keeps answering 410. It now clears the tokens and performs a single 
full re-sync.
   * `c.getItems()` was dereferenced without a null check; the calendar omits 
the field when there are
     no events.
   
   _Claude Code on behalf of oscerd_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to