Skip to content
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

Unit test elastic indexer #2288

Merged
merged 6 commits into from
Sep 18, 2020
Merged

Unit test elastic indexer #2288

merged 6 commits into from
Sep 18, 2020

Conversation

miiu96
Copy link
Contributor

@miiu96 miiu96 commented Sep 14, 2020

Unit test for package core/indexer

# Conflicts:
#	core/indexer/dataDispatcher.go
#	core/indexer/elasticProcessor_test.go
@miiu96 miiu96 marked this pull request as ready for review September 15, 2020 09:31
@miiu96 miiu96 changed the title [WIP - do not review] Unit test elastic indexer Unit test elastic indexer Sep 15, 2020
@miiu96 miiu96 self-assigned this Sep 15, 2020
@@ -237,7 +237,7 @@ func (ei *elasticProcessor) RemoveMiniblocks(header data.HeaderHandler, body *bl

isDstMe := selfShardID == miniblock.ReceiverShardID
isCrossShard := miniblock.ReceiverShardID != miniblock.SenderShardID
if !(isDstMe && isCrossShard) {
if isDstMe && isCrossShard {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the condition is completely reversed. The bulk remove is not done anymore for cross miniblocks wit dest me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Now is right because if a miniblock is indexed on source shard and if a rollback appears cross shard miniblocks should not be removed because I have to keep information that was indexed on source shard. When miniblock will be executed again on destination shard information will be rewritten.

@sasurobert sasurobert self-requested a review September 16, 2020 14:02
# Conflicts:
#	core/indexer/dataDispatcher.go
#	core/indexer/dataDispatcher_test.go
#	core/indexer/errors.go
#	core/indexer/workItems/workItemRemoveBlock.go
@miiu96 miiu96 merged commit af83e8e into es-imp-v2 Sep 18, 2020
@miiu96 miiu96 deleted the unit-tests-es-new-impl branch September 18, 2020 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants