-
Notifications
You must be signed in to change notification settings - Fork 294
Persist validation markers to S3 for UCC. #1122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9d94564 to
783b495
Compare
clohfink
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 with some changes you can ignore if disagree
| import javax.inject.Inject; | ||
| import javax.inject.Provider; | ||
|
|
||
| public class SnapshotValidationMarkerWriter { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NP: use of Verification instead of Validation other places, rename to maintain consistent terminology
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| try { | ||
| fs.putObject(config.getBackupPrefix(), key, remotePath); | ||
| } catch (Exception e) { | ||
| logger.error("Failed to put snapshot verification marker. bucket: {}, key: {}, value: {}, message: {}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could use a retry since it doesnt provide any metrics or anything to notify and we expect S3 puts to fail sometimes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also a success/failure metric might be good to add
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added retries. We can metrics implicitly when we centralize validation and include these in the checks.
IMO we can justify stacking a bet here because this is meant as a fallback rather than the main mechanism to get these data.
f21eb07 to
d998c72
Compare
d998c72 to
558d7ab
Compare
This persists an alternative location for backup metadata in S3 in case of unavailability of the primary source of truth. Tests are in progress and will be added in a follow-up commit. I have confirmed it WAI in practice.