-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fail the update when blob version is different from transition plan v…
…ersion
- Loading branch information
1 parent
e7ce7db
commit 3df6e33
Showing
3 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
hollow/src/main/java/com/netflix/hollow/api/error/VersionMismatchException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.netflix.hollow.api.error; | ||
|
||
public class VersionMismatchException extends HollowException { | ||
private final long expectedVersion; | ||
|
||
private final long actualVersion; | ||
|
||
public VersionMismatchException(long expectedVersion, long actualVersion) { | ||
super("toVersion in blob didn't match toVersion seen in metadata; actualToVersion=" + actualVersion + ", expectedToVersion=" + expectedVersion); | ||
this.expectedVersion = expectedVersion; | ||
this.actualVersion = actualVersion; | ||
} | ||
|
||
public long getExpectedVersion() { | ||
return expectedVersion; | ||
} | ||
|
||
public long getActualVersion() { | ||
return actualVersion; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters