Bug #78129 pollEvents() returns incorrect 'latestGCI'
Submitted: 18 Aug 2015 13:53 Modified: 19 Aug 2015 11:20
Reporter: Ole John Aske Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: NDB API Severity:S3 (Non-critical)
Version:7.4.8 OS:Any
Assigned to: CPU Architecture:Any

[18 Aug 2015 13:53] Ole John Aske
Description:
pollEvents() and pollEvents2() is assumed to return the highest buffered epoch available for retrieval by nextEvent(). In some cases it fail to set a new (higher) GCI value for event data it polled. This may result in later calls to nextEvent() / nextEvent2() seeing events not yet known of through nextEvents().

The root cause, is that 'm_latestGCI' is not updated for epochs being completed through ::set_total_buckets().

How to repeat:

Run the new test: 'test_event -n SubscribeUnsubscribeWithLoad'
[19 Aug 2015 11:20] Jon Stephens
Documented fix in the NDB 7.2.22, 7.3.11, and 7.4.8 changelogs as follows:

    The internal value representing the latest global checkpoint was
    not always updated when a completed epoch of event buffers was
    inserted into the event queue. This caused subsequent calls to
    Ndb::pollEvents() and pollEvents2() to fail when trying to
    obtain the correct GCI for the events available in the event
    buffers. This could also result in later calls to nextEvent() or
    nextEvent2() seeing events that had not yet been discovered.

Closed.