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 - [v15] Avoid unnecessary atomic operation on bytesWritten #277

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 6f61b26 into v15.x Oct 25, 2024
6 checks passed
@abhinavdangeti abhinavdangeti deleted the statsCalc15 branch October 25, 2024 14:54
@abhinavdangeti
Copy link
Member

Created v15.3.16 to include this.

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