Skip to content

Commit 84477d3

Browse files
authored
Merge pull request #530 from weaviate/feature/cancel-restore
Support new backup restore statuses
2 parents 2dbb612 + 16d2719 commit 84477d3

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ Backup backup = client.backup.create(
755755
// Now you can poll backup status to know when it is succeedes (or fails).
756756
757757
Backup status = client.backup.getCreateStatus(backup.id(), backup.backend());
758-
if (status.status() == BackupStatus.SUCCESSFUL) {
758+
if (status.status() == BackupStatus.SUCCESS) {
759759
System.out.println("Yay!");
760760
System.exit(0);
761761
}

src/main/java/io/weaviate/client6/v1/api/backup/BackupStatus.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@ public enum BackupStatus {
99
/** Backup in progress, data is being transferred. */
1010
@SerializedName("TRANSFERRING")
1111
TRANSFERRING,
12+
/**
13+
* Cancellation has been claimed by a coordinator.
14+
* Used as a distributed lock to prevent race conditions when multiple coordinators
15+
* attempt to cancel the same restore.
16+
*/
17+
@SerializedName("CANCELLING")
18+
CANCELLING,
19+
/**
20+
* File staging is complete and schema changes are being applied.
21+
* Cancellation is blocked.
22+
*/
23+
@SerializedName("FINALIZING")
24+
FINALIZING,
1225
/** Backup creation / restoration completed successfully. */
1326
@SerializedName("SUCCESS")
1427
SUCCESS,

0 commit comments

Comments
 (0)