-
Notifications
You must be signed in to change notification settings - Fork 33
(VDB-570) Handle duplicate storage diffs #93
Conversation
- If processing a new diff for a row that already exists in the DB, ignore the error without logging or queueing - If processing a queued diff for a row that already exists, remove it from the queue
51daecb
to
36c4da3
Compare
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.
🎉
@@ -193,5 +193,5 @@ func composeAndExecute() { | |||
func init() { | |||
rootCmd.AddCommand(composeAndExecuteCmd) | |||
composeAndExecuteCmd.Flags().BoolVarP(&recheckHeadersArg, "recheck-headers", "r", false, "whether to re-check headers for watched events") | |||
composeAndExecuteCmd.Flags().DurationVarP(&queueRecheckInterval, "queue-recheck-interval", "q", 5 * time.Minute, "how often to recheck queued storage diffs") | |||
composeAndExecuteCmd.Flags().DurationVarP(&queueRecheckInterval, "queue-recheck-interval", "q", 5*time.Minute, "how often to recheck queued storage diffs") |
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.
@rmulhol The format/resolution to supply this parameter in is unclear. Seconds?
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.
@m0ar duration takes a format like 5m30s
- put some examples in the flags
section of the composeAndExecute
docs, but happy to augment/move that if you think that'd be helpful.
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.
Add it in the short-hand docs on this line as well? I'd never have guessed :D
@@ -139,7 +139,7 @@ func execute() { | |||
func init() { | |||
rootCmd.AddCommand(executeCmd) | |||
executeCmd.Flags().BoolVarP(&recheckHeadersArg, "recheck-headers", "r", false, "whether to re-check headers for watched events") | |||
executeCmd.Flags().DurationVarP(&queueRecheckInterval, "queue-recheck-interval", "q", 5 * time.Minute, "how often to recheck queued storage diffs") | |||
executeCmd.Flags().DurationVarP(&queueRecheckInterval, "queue-recheck-interval", "q", 5*time.Minute, "how often to recheck queued storage diffs") |
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.
Same as above
ignore the error without logging or queueing
it from the queue