Catches-up a single log position in the local replica. This function returns the highest proposal number seen. The returned proposal number can be used to save extra proposal number bumps.
| 146 | // function returns the highest proposal number seen. The returned |
| 147 | // proposal number can be used to save extra proposal number bumps. |
| 148 | static Future<uint64_t> catchup( |
| 149 | size_t quorum, |
| 150 | const Shared<Replica>& replica, |
| 151 | const Shared<Network>& network, |
| 152 | uint64_t proposal, |
| 153 | uint64_t position) |
| 154 | { |
| 155 | CatchUpProcess* process = |
| 156 | new CatchUpProcess( |
| 157 | quorum, |
| 158 | replica, |
| 159 | network, |
| 160 | proposal, |
| 161 | position); |
| 162 | |
| 163 | Future<uint64_t> future = process->future(); |
| 164 | spawn(process, true); |
| 165 | return future; |
| 166 | } |
| 167 | |
| 168 | |
| 169 | // TODO(jieyu): Our current implementation catches-up each position in |