Skip to content

Commit

Permalink
epoch: fix idle detection bug in synchronize.
Browse files Browse the repository at this point in the history
An idle grace period requires all threads to be idle. This optimization
introduced a regression with idle detection if subset of threads are
both active and idle. Unfortunately, none of our test machines detected
the problem.

This issue was reported by Julie Zhao <julie.zhao@sparkpos....>
  • Loading branch information
Samy Al Bahra committed Feb 27, 2017
1 parent 255a475 commit d24fc27
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ck_epoch.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,12 @@ ck_epoch_scan(struct ck_epoch *global,
{
ck_stack_entry_t *cursor;

*af = false;
if (cr == NULL) {
cursor = CK_STACK_FIRST(&global->records);
*af = false;
} else {
cursor = &cr->record_next;
*af = true;
}

while (cursor != NULL) {
Expand Down

0 comments on commit d24fc27

Please sign in to comment.