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

fix: replace chunk locker with mutext #4449

Closed
wants to merge 1 commit into from
Closed

Conversation

notanatol
Copy link
Contributor

Checklist

Description

replace chunk locker mechanism with an stdlib's mutex

Related: #4341

@ldeffenb
Copy link
Collaborator

ldeffenb commented Nov 8, 2023

Are you planning any performance impact tests on this change? Seems to me that changing from a (presumably) chunk-specific lock to a global local on the syncChunkStore is going to seriously throttle (slow down) parallel operations in the node. But then again, something needs to better protect against the random issues we see in the relational integrity of the chunkStore.

@notanatol
Copy link
Contributor Author

Yes, according to these two benchmarks (that both use wrapSync) the performance is comparable, most likely to the previous implementation of locker not doing any meaningful guarding.
current branch:

BenchmarkReservePutter-8  8481	    152460 ns/op	   27886 B/op	     396 allocs/op
BenchmarkCachePutter-8  6631	    180415 ns/op	   20683 B/op	     320 allocs/op

master:

BenchmarkReservePutter-8  7214	    154002 ns/op	   27914 B/op	     397 allocs/op
BenchmarkCachePutter-8   6877	    184118 ns/op	   20587 B/op	     322 allocs/op

however this task has been de-prioritized and it will be continued sometime next year, I'll be moving it into draft state now.

@notanatol notanatol marked this pull request as draft November 8, 2023 13:57
@notanatol notanatol added the on hold Temporarily halted by other development label Nov 8, 2023
@istae
Copy link
Member

istae commented Jan 31, 2024

this is being handled in this PR #4561

@istae istae closed this Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold Temporarily halted by other development pull-request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants