-
Notifications
You must be signed in to change notification settings - Fork 198
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
Fix indexing pending problem when running in import-DB mode #2401
Fix indexing pending problem when running in import-DB mode #2401
Conversation
iulianpascalau
commented
Oct 23, 2020
•
edited
edited
- made the elastic search not index transactions if the node is node in the sender shard when running in import-db
…in the destination shard when running in import-db
@@ -35,7 +38,7 @@ func (wf *viewsFactory) Create() ([]Viewer, error) { | |||
} | |||
|
|||
func (wf *viewsFactory) createTermuiConsole() (*termuic.TermuiConsole, 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.
vf instead wf
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.
Done in the update branch PR
core/indexer/elasticProcessor.go
Outdated
) | ||
|
||
if arguments.IsInImportDBMode { | ||
log.Warn("the node is in import mode! Elastic search will not send cross shard transactions and rewards " + |
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.
rephrase to cross shard transactions and rewards where destination shard is not the current node's shard won't be indexed in Elastic Search
as the es is the receiver here
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.
rephrased
core/indexer/processTransactions.go
Outdated
@@ -275,10 +275,10 @@ func (tdp *txDatabaseProcessor) groupNormalTxsAndRewards( | |||
case block.RewardsBlock: | |||
rTxs := getRewardsTransaction(txPool, mb.TxHashes) | |||
for hash, rtx := range rTxs { | |||
dbTx := tdp.commonProcessor.buildRewardTransaction(rtx, []byte(hash), mbHash, mb, header, mbTxStatus) | |||
addToAlteredAddresses(dbTx, alteredAddresses, mb, selfShardID, true) | |||
alteredAddresses[dbTx.Receiver] = struct{}{} |
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.
This set is ok? It is done in the method addToAlteredAddresses called above only under some certain conditions. For case block.TxBlock: above this set is not done, this is why I thought that could be something wrong here or something missed above.
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.
removed, thanks