Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Remove handling of duplicate storage diffs in watcher #96

Merged
merged 1 commit into from
May 20, 2019

Conversation

rmulhol
Copy link
Contributor

@rmulhol rmulhol commented May 15, 2019

  • Can push this responsibility down to the transformers
  • Update docs to reflect that transformers should handle duplicates

Was thinking that it might be helpful to have docs for what the storage watcher is doing, but going to postpone that until our current doc improvement iteration is wrapped up.

Not simply reverting the previous commit since it includes some formatting improvements, and this includes some documentation improvements.

Copy link
Contributor

@m0ar m0ar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌 👌

@@ -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, "interval duration for rechecking queued storage diffs (ex: 5m30s)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

Copy link
Collaborator

@i-norden i-norden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@@ -100,6 +100,7 @@ type Repository interface {
A contract-specific implementation of the repository interface enables the transformer to write the decoded storage value to the appropriate table in postgres.

The `Create` function is expected to recognize and persist a given storage value by the variable's name, as indicated on the row's metadata.
Note: we advise silently discarding duplicates in `Create` - as it's possible that you may read your the same diff several times, and an error will trigger the storage watcher to queue that diff for later processing.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"may read your the same diff"

- Can push this responsibility down to the transformers
- Update docs to reflect that transformers should handle duplicates
@rmulhol rmulhol force-pushed the remove-storage-diff-duplicate-handling branch from 4f688b5 to e290979 Compare May 20, 2019 18:29
@rmulhol rmulhol merged commit 2598704 into staging May 20, 2019
@rmulhol rmulhol deleted the remove-storage-diff-duplicate-handling branch May 20, 2019 19:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants