Skip to content

merkledb / sync -- remove TODOs #1718

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

Merged
merged 2 commits into from
Jul 17, 2023
Merged

merkledb / sync -- remove TODOs #1718

merged 2 commits into from
Jul 17, 2023

Conversation

danlaine
Copy link

Why this should be merged

I think these TODOs are TODONT's

How this works

Remove comments

How this was tested

N/A

@danlaine danlaine requested a review from darioush as a code owner July 14, 2023 20:19
@danlaine danlaine self-assigned this Jul 14, 2023
@danlaine danlaine requested a review from dboehm-avalabs as a code owner July 14, 2023 20:19
@@ -566,7 +566,6 @@ func (db *merkleDB) GetChangeProof(
return i.Compare(j) < 0
})

// TODO: sync.pool these buffers
Copy link
Author

Choose a reason for hiding this comment

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

I don't think this would be worth the added cognitive load

Comment on lines -193 to -196
// TODO danlaine: We won't release [m.workLock] until
// we've started a goroutine for each available work item.
// We can't apply proofs we receive until we release [m.workLock].
// Is this OK? Is it possible we end up with too many goroutines?
Copy link
Author

Choose a reason for hiding this comment

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

This was fixed a while back by the above case:

case m.processingWorkItems >= m.config.SimultaneousWorkLimit:
			// We're already processing the maximum number of work items.
			// Wait until one of them finishes.
			m.unprocessedWorkCond.Wait()

@danlaine
Copy link
Author

@StephenButtolph

q: why does this function exist at all? It doesn't seem to cancel any outstanding requests or cleanup any state

I'm down to remove it

@danlaine danlaine merged commit 7cfcab8 into dev Jul 17, 2023
@danlaine danlaine deleted the remove-todos branch July 17, 2023 20:21
@StephenButtolph StephenButtolph added this to the v1.10.5 milestone Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants