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

Add missed headers from headers pool into tracker pool #2316

Merged

Conversation

SebastianMarian
Copy link
Contributor

  • Implemented a mechanism which adds into tracker pool the needed headers which are not found there but they exist in headers pool

…ders which are not found there but they exist in headers pool
@SebastianMarian SebastianMarian added type:bug Something isn't working type:feature New feature or request labels Sep 22, 2020
@SebastianMarian SebastianMarian self-assigned this Sep 22, 2020
@sasurobert sasurobert self-requested a review September 22, 2020 16:19
iulianpascalau
iulianpascalau previously approved these changes Sep 22, 2020
Copy link
Contributor

@iulianpascalau iulianpascalau left a comment

Choose a reason for hiding this comment

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

Tested also in import-db mode. Works as expected.

iulianpascalau
iulianpascalau previously approved these changes Sep 23, 2020
@@ -957,7 +957,7 @@ func (mp *metaProcessor) createAndProcessCrossMiniBlocksDstMe(
}
mp.hdrsForCurrBlock.mutHdrsForBlock.Unlock()

mp.requestShardHeadersIfNeeded(hdrsAddedForShard, lastShardHdr)
go mp.requestShardHeadersIfNeeded(hdrsAddedForShard, lastShardHdr)
Copy link
Contributor

Choose a reason for hiding this comment

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

no need for go routine - you have under it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I have added because the call of the new method addHeaderIntoTrackerPool which has been added in underlying method. I will remove go from there

@@ -1611,7 +1611,7 @@ func (sp *shardProcessor) createAndProcessMiniBlocksDstMe(
}
sp.hdrsForCurrBlock.mutHdrsForBlock.Unlock()

sp.requestMetaHeadersIfNeeded(hdrsAdded, lastMetaHdr)
go sp.requestMetaHeadersIfNeeded(hdrsAdded, lastMetaHdr)
Copy link
Contributor

Choose a reason for hiding this comment

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

no need for go routine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I have added because the call of the new method addHeaderIntoTrackerPool which has been added in underlying method. I will remove go from there

@@ -231,7 +231,7 @@ func (bp *blockProcessor) ComputeLongestChain(shardID uint32, header data.Header
var sortedHeadersHashes [][]byte

defer func() {
bp.requestHeadersIfNeeded(header, sortedHeaders, headers)
go bp.requestHeadersIfNeeded(header, sortedHeaders, headers)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think there is a go routine in that function - thus there is no need for this. or delete go routine in the underlying funciton

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I have added because the call of the new method AddHeaderFromPool which has been added in underlying method. I will remove go from there

Copy link
Contributor

@iulianpascalau iulianpascalau left a comment

Choose a reason for hiding this comment

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

Looks ok, import-db test in progress....

Copy link
Contributor

@sasurobert sasurobert left a comment

Choose a reason for hiding this comment

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

much better.

Copy link
Contributor

@iulianpascalau iulianpascalau left a comment

Choose a reason for hiding this comment

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

initial import-db test passed. Sync time ~7-8h on shard 0

Copy link
Contributor

@LucianMincu LucianMincu left a comment

Choose a reason for hiding this comment

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

System tests passed.

@LucianMincu LucianMincu merged commit 73a2f89 into development Sep 23, 2020
@LucianMincu LucianMincu deleted the Add-missed-headers-from-headers-pool-in-tracker-pool branch September 23, 2020 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working type:feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants