Skip to content
Permalink
Browse files
[NO ISSUE][REP] Extensible Recovery Cleanup
- user model changes: no
- storage format changes: no
- interface changes: no

Details:

- Extensible recovery cleanup after replaying replica
  partitions log.

Change-Id: I57aa7e17026148d2e8d3307a2b82ef4dbc93b910
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/12984
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
  • Loading branch information
mhubail committed Aug 26, 2021
1 parent 71085c2 commit e7f6f72a480ed09d879e540a325825a61d55fae0
Showing 1 changed file with 5 additions and 2 deletions.
@@ -161,14 +161,12 @@ public SystemState getSystemState() throws ACIDException {
public void startLocalRecovery(Set<Integer> partitions) throws IOException, ACIDException {
state = SystemState.RECOVERING;
LOGGER.info("starting recovery for partitions {}", partitions);

long readableSmallestLSN = logMgr.getReadableSmallestLSN();
Checkpoint checkpointObject = checkpointManager.getLatest();
long lowWaterMarkLSN = checkpointObject.getMinMCTFirstLsn();
if (lowWaterMarkLSN < readableSmallestLSN) {
lowWaterMarkLSN = readableSmallestLSN;
}

//delete any recovery files from previous failed recovery attempts
deleteRecoveryTemporaryFiles();

@@ -538,6 +536,7 @@ public synchronized void replayReplicaPartitionLogs(Set<Integer> partitions, boo
if (flush) {
appCtx.getDatasetLifecycleManager().flushAllDatasets();
}
cleanUp(partitions);
} catch (IOException | ACIDException e) {
throw HyracksDataException.create(e);
} finally {
@@ -571,6 +570,10 @@ public void deleteRecoveryTemporaryFiles() {
FileUtils.deleteQuietly(recoveryFolderPath.toFile());
}

protected void cleanUp(Set<Integer> partitions) throws HyracksDataException {
// the cleanup is currently done by PersistentLocalResourceRepository#clean
}

private String getRecoveryDirPath() {
String logDir = logMgr.getLogManagerProperties().getLogDir();
if (!logDir.endsWith(File.separator)) {

0 comments on commit e7f6f72

Please sign in to comment.