e2pg: add integration update table #188
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This table will be used to control backfill tasks. The task table keeps a history of blocks processed, but they are used for detecting a re-organization. It does not track an integration's individual progress.
By introducing the intg table, we now can know the precise set of blocks that an integration has processed.
This will enable a backfill task to group a set of integrations that need backfilling and process block history based on the needs of the integration.
This commit also introduces the notion of e2pg.{task,intg} pruning. We keep around the last 200 blocks for each src_name / src_name,name. This should help keep queries on this table fast while also preserving history for reorgs and debugging.