server: Setting snapshot removed on timeout (#4425)

* Setting snapshot state to error on timeout

* Setting removed field so snapshot record is ignored by garbage collection

* Removed explicitly setting error status, renamed method from markFailed to markRemoved

* Renamed method, moved code a few lines down

* Moved remove logic

* Removed unused service

* Moved removed logic - last time, promise
This commit is contained in:
Spaceman1984 2020-11-20 22:50:16 +02:00 committed by GitHub
parent d3f18ef71c
commit dfa09fc856
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -323,6 +323,7 @@ public class SnapshotServiceImpl implements SnapshotService {
if (result.isFailed()) {
try {
if (createSnapshotPayload.getAsyncBackup()) {
_snapshotDao.remove(srcSnapshot.getId());
destSnapshot.processEvent(Event.OperationFailed);
throw new SnapshotBackupException("Failed in creating backup of snapshot with ID "+srcSnapshot.getId());
} else {