-
Notifications
You must be signed in to change notification settings - Fork 44
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
feat(task): Create chainvis views and refresher #77
Conversation
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.
LGTM with a minor nit
Nice use of the task interface.
return wait.RepeatUntil(ctx, r.refreshRate, r.refreshView) | ||
} | ||
|
||
func (r *ChainVisRefresher) refreshView(ctx context.Context) (bool, error) { |
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.
Minor nit: would be cleaner to have these views in a slice that is looped over
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.
🚢
4f5cf98
to
c8c9a42
Compare
c8c9a42
to
9009eea
Compare
9009eea
to
c4b2f54
Compare
* origin/master: fix: remove errgrp from UnindexedBlockData persist fix: verify there are no missing migrations before migrating (#89) chore: add tests for reward and power actor state extracters (#83) feat: support v2 actor codes (#84) feat(debug): Process actor by head without persistance (#86) fix: use debugf logging method in message processor (#82) feat(task): Create chainvis views and refresher (#77) perf: minor optimization of market actor diffing (#78) chore: fail database tests if VISOR_TEST_DB not set (#79) test(storage): add test to check for duplicate schema migrations (#80) in-process lotus "repo" lens (#75) Conflicts: tasks/actorstate/miner.go
This PR serves two purposes:
--chainvis-refresh-rate=1m
with some value greater than 0 (which disables the refresh loop entirely).Overall, this pattern intends to add zero operational overhead and minimal developer overhead (specifically in maintaining the underlying tables supporting these views). Refresh is completely optional. Creation of materialized views without data initialized are virtually free to maintain in schema. Cost of refreshing views is managed by configurable refresh rate.
Potential areas of improvement: