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
systemlog indexer and api #1960
Conversation
c3fcdf6
to
5b1408b
Compare
Codecov Report
@@ Coverage Diff @@
## master #1960 +/- ##
==========================================
+ Coverage 58.13% 58.32% +0.19%
==========================================
Files 186 185 -1
Lines 16143 16089 -54
==========================================
Hits 9384 9384
+ Misses 5592 5518 -74
- Partials 1167 1187 +20
Continue to review full report at Codecov.
|
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.
almost there
chainservice/chainservice.go
Outdated
} else { | ||
dao = blockdao.NewBlockDAO(kvStore, nil, cfg.Chain.CompressBlock, cfg.DB) | ||
} | ||
dao := blockdao.NewBlockDAO(kvStore, indexers, cfg.Chain.CompressBlock, cfg.DB) |
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.
indexers are appended to blockdao in sync mode. In async mode, we need to add the indexers as subscriber. So you need to revert this change.
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.
I handle this at line 163
if !cfg.Chain.EnableAsyncIndexWrite {
indexers = append(indexers, indexer)
}
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.
Or we need to make systemlog indexer as subsrciber?
70ee38e
to
ae13563
Compare
var dao blockdao.BlockDAO | ||
if gateway && !cfg.Chain.EnableAsyncIndexWrite { | ||
dao = blockdao.NewBlockDAO(kvStore, []blockdao.BlockIndexer{indexer}, cfg.Chain.CompressBlock, cfg.DB) | ||
} else { | ||
dao = blockdao.NewBlockDAO(kvStore, nil, cfg.Chain.CompressBlock, cfg.DB) | ||
} | ||
dao = blockdao.NewBlockDAO(kvStore, indexers, cfg.Chain.CompressBlock, cfg.DB) |
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.
one line
It is better to have system log indexer and the action indexer sharing the same config, EnableAsyncIndexing. |
No description provided.