| 315 | } |
| 316 | |
| 317 | void pop() { |
| 318 | if (backupEpoch > oldestBackupEpoch || stopped) { |
| 319 | // Defer pop if old epoch hasn't finished popping yet. |
| 320 | // If stopped because of displacement, do NOT pop as the progress may |
| 321 | // not be saved in a timely fashion. As a result, next epoch may still |
| 322 | // need to read mutations in the version range. Let the next epoch's |
| 323 | // worker do the pop instead. |
| 324 | TraceEvent("BackupWorkerPopDeferred", myId) |
| 325 | .suppressFor(1.0) |
| 326 | .detail("BackupEpoch", backupEpoch) |
| 327 | .detail("OldestEpoch", oldestBackupEpoch) |
| 328 | .detail("Version", savedVersion); |
| 329 | return; |
| 330 | } |
| 331 | ASSERT_WE_THINK(backupEpoch == oldestBackupEpoch); |
| 332 | const Tag popTag = logSystem.get()->getPseudoPopTag(tag, ProcessClass::BackupClass); |
| 333 | logSystem.get()->pop(std::max(popVersion, savedVersion), popTag); |
| 334 | } |
| 335 | |
| 336 | void stop() { |
| 337 | stopped = true; |
no test coverage detected