Previous patch[1] cleared the isNotificationScheduled flag
at the wrong place and meant things could then never
again get scheduled.
This is because we only cleared the flag if tp->isPaused()
yet we still pop the notification from the queue, so we
left tp->isNotificationScheduled yet the queue is empty.
Now no more notifications will ever get scheduled!
So we need to clear the notification scheduled boolean
unconditionally of the other flags on tp.
[1] - Commit
0856e0b3d3fc6
Change-Id: I11c9fd72f4b35102328022bd4c334a9e09a61cd0
Reviewed-on: http://review.couchbase.org/64072
Well-Formed: buildbot <build@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Reviewed-by: Will Gardner <will.gardner@couchbase.com>
while (!queue.empty()) {
connection_t &conn = queue.front();
Notifiable *tp = dynamic_cast<Notifiable*>(conn.get());
- if (tp && tp->isPaused() && conn->isReserved()) {
+ if (tp) {
tp->setNotificationScheduled(false);
- engine.notifyIOComplete(conn->getCookie(), ENGINE_SUCCESS);
- tp->setNotifySent(true);
+ if (tp->isPaused() && conn->isReserved()) {
+ engine.notifyIOComplete(conn->getCookie(), ENGINE_SUCCESS);
+ tp->setNotifySent(true);
+ }
}
queue.pop();
}