mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed snapshot expire
This commit is contained in:
@@ -84,16 +84,19 @@ public class DatabaseTableMeta implements TableMetaTSDB {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
boolean applyResult = false;
|
||||
try {
|
||||
MDC.put("destination", destination);
|
||||
applySnapshotToDB(lastPosition, false);
|
||||
applyResult = applySnapshotToDB(lastPosition, false);
|
||||
} catch (Throwable e) {
|
||||
logger.error("scheudle applySnapshotToDB faield", e);
|
||||
}
|
||||
|
||||
try {
|
||||
MDC.put("destination", destination);
|
||||
snapshotExpire((int) TimeUnit.HOURS.toSeconds(snapshotExpire));
|
||||
if (applyResult) {
|
||||
snapshotExpire((int) TimeUnit.HOURS.toSeconds(snapshotExpire));
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
logger.error("scheudle snapshotExpire faield", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user