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

Log unverified blockstore memory consumption #201

Merged
merged 5 commits into from
Aug 18, 2021

Conversation

aarshkshah1992
Copy link
Contributor

@aarshkshah1992 aarshkshah1992 commented Aug 18, 2021

@aarshkshah1992 aarshkshah1992 changed the title Log in-memory unverified blockstore consumption Log unverified blockstore memory consumption Aug 18, 2021
@@ -30,21 +33,26 @@ func New(storer ipld.Storer) *UnverifiedBlockStore {
// comes in as part of a traversal.
func (ubs *UnverifiedBlockStore) AddUnverifiedBlock(lnk ipld.Link, data []byte) {
ubs.inMemoryBlocks[lnk] = data
ubs.dataSize = ubs.dataSize + uint64(len(data))
Copy link
Member

Choose a reason for hiding this comment

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

I guess we don't need to synchronize because anyway the map is not synchronized, which suggests that this component is only ever called serially?

Copy link
Contributor Author

@aarshkshah1992 aarshkshah1992 Aug 18, 2021

Choose a reason for hiding this comment

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

@raulk Yeah - it's all done inside an event loop.

Co-authored-by: raulk <raul@protocol.ai>
@aarshkshah1992 aarshkshah1992 merged commit e1842d1 into release/0.6.x Aug 18, 2021
@aarshkshah1992 aarshkshah1992 deleted the feat/log-memory-blockstore-consumption branch August 18, 2021 10:56
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.

2 participants