| 557 | |
| 558 | |
| 559 | void GroupProcess::updated(int64_t sessionId, const string& path) |
| 560 | { |
| 561 | if (error.isSome() || sessionId != zk->getSessionId()) { |
| 562 | return; |
| 563 | } |
| 564 | |
| 565 | CHECK_EQ(znode, path); |
| 566 | |
| 567 | Try<bool> cached = cache(); // Update cache (will invalidate first). |
| 568 | |
| 569 | if (cached.isError()) { |
| 570 | abort(cached.error()); // Cancel everything pending. |
| 571 | } else if (!cached.get()) { |
| 572 | CHECK_NONE(memberships); |
| 573 | |
| 574 | // Try again later. |
| 575 | if (!retrying) { |
| 576 | delay(RETRY_INTERVAL, self(), &GroupProcess::retry, RETRY_INTERVAL); |
| 577 | retrying = true; |
| 578 | } |
| 579 | } else { |
| 580 | update(); // Update any pending watches. |
| 581 | } |
| 582 | } |
| 583 | |
| 584 | |
| 585 | void GroupProcess::created(int64_t sessionId, const string& path) |