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

MB-57871 - Avoid unnecessary atomic operation on bytesWritten #278

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

Thejas-bhat
Copy link
Member

  • the construct of bytes written while constructing a segment is not a shared resource i.e. a single thread operates on a segment creation. Hence the atomic.Add() operation is not necessary here.
  • Tested using bleve unit test with race flace
go test -run=TestBytesWritten --race
PASS
ok  	github.com/blevesearch/bleve/v2	2.294s

@abhinavdangeti abhinavdangeti merged commit ef2b41d into master Oct 25, 2024
6 checks passed
@abhinavdangeti abhinavdangeti deleted the statsCalc branch October 25, 2024 14:55
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