-
Notifications
You must be signed in to change notification settings - Fork 47
setup for indexer refacor #850
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
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## indexer-refactor #850 +/- ##
==================================================
+ Coverage 32.1% 32.6% +0.4%
==================================================
Files 39 39
Lines 3785 3715 -70
==================================================
- Hits 1217 1212 -5
+ Misses 2420 2356 -64
+ Partials 148 147 -1 🚀 New features to boost your workflow:
|
37bb4cd
to
3b14800
Compare
tasks/messageexecutions/message.go
Outdated
mex, err := p.node.GetMessageExecutionsForTipSet(ctx, ts, pts) | ||
if err != nil { | ||
report.ErrorsDetected = xerrors.Errorf("getting messages executions for tipset: %w", err) | ||
return nil, report, nil | ||
} | ||
|
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.
Returning the error here would be fatal meaning the corresponding walk, watch, or fill job would abort completely -- that would be inconsistent with current behavior. So, we list this as a detected error in the report which will mark the task as ERROR
in the corresponding processing report, and return immediately with no data extracted.
tasks/messages/message.go
Outdated
tsMsgs, err := p.node.GetExecutedAndBlockMessagesForTipset(ctx, ts, pts) | ||
if err != nil { | ||
report.ErrorsDetected = xerrors.Errorf("getting executed and block messages: %w", err) | ||
return nil, report, nil | ||
} |
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.
(ditto) Returning the error here would be fatal meaning the corresponding walk, watch, or fill job would abort completely -- that would be inconsistent with current behavior. So, we list this as a detected error in the report which will mark the task as ERROR
in the corresponding processing report, and return immediately with no data extracted.
tasks/msapprovals/msapprovals.go
Outdated
tsMsgs, err := p.node.GetExecutedAndBlockMessagesForTipset(ctx, ts, pts) | ||
if err != nil { | ||
report.ErrorsDetected = xerrors.Errorf("getting executed and block messages: %w", err) | ||
return nil, report, nil | ||
} | ||
emsgs := tsMsgs.Executed | ||
|
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.
(ditto) Returning the error here would be fatal meaning the corresponding walk, watch, or fill job would abort completely -- that would be inconsistent with current behavior. So, we list this as a detected error in the report which will mark the task as ERROR
in the corresponding processing report, and return immediately with no data extracted.
e8a7ac6
to
5b4af09
Compare
3b14800
to
beba785
Compare
- merge message execution processor with message processor - use DataSource API to retrieve Internal, Executed, and Block messages from within their respective processors
beba785
to
9c47558
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.
LGTM. One step closer to simplifying the indexer
What
This PR targets the
indexer-refactor
branch.This PR aims to keep indexer behavior consistent with the current while landing some refactor work to improve code extensibility.
GetExecutedAndBlockMessagesForTipset
in processors, preventing unnecessary (and expensive!) calls to the method when its output isn't used. And example of this would be running all actor tasks excluding the miner actor. Prior changes here ensure multiple calls to this method are only executed once, returning a cached value for subsequent calls. This change also makes the indexer's logic more concise.GetMessageExecutions
in processors, taking advantage of the memoized method pattern used in previous commit. This has the added bonus of removing theProcessMessageExecution
interface and fitting the messege execution task under theProcessMessages
interface.Follow on: #871