[#221] pool: Make sampler safe for concurrent using #222
No reviewers
TrueCloudLab/storage-sdk-developers
TrueCloudLab/storage-services-committers
TrueCloudLab/storage-services-developers
Labels
No labels
P0
P1
P2
P3
good first issue
pool
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-sdk-go#222
Loading…
Reference in a new issue
No description provided.
Delete branch "dkirillov/frostfs-sdk-go:bugfix/221-pool_sampler"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
close #221
Signed-off-by: Denis Kirillov d.kirillov@yadro.com
@ -40,6 +41,28 @@ func TestSamplerStability(t *testing.T) {
}
}
func TestConcurrentSampler(t *testing.T) {
How long does it take for this test to execute?
If it triggers panic, we could use 2 goroutines and
-race
flag instead, should fail too.Yes, we can add
-race
totest
makefile targetNo, I mean the test itself is not worth having IMO:
-race
should catch the race even with 2 concurrent threads, 10_000 threads create a noticeable increase in test running time.sampler
are trivial enough IMO, it has 1 public method and 1 field we need to protect.1d3fe47e69
toc5c6272029