| 737 | } |
| 738 | |
| 739 | void runLearnPhase(const Action& action) |
| 740 | { |
| 741 | CHECK(action.has_learned() && action.learned()); |
| 742 | |
| 743 | // We need to make sure that the learned message has been |
| 744 | // broadcasted before the fill process completes. Some users may |
| 745 | // rely on this invariant (e.g. checking if the local replica has |
| 746 | // learned the action). |
| 747 | log::learn(network, action) |
| 748 | .onAny(defer(self(), &Self::checkLearnPhase, action, lambda::_1)); |
| 749 | } |
| 750 | |
| 751 | void checkLearnPhase(const Action& action, const Future<Nothing>& future) |
| 752 | { |