Skip to content

Conversation

@puellanivis
Copy link
Contributor

This completes the change in #3277 and rolls out all atomics usage to using the types, rather than the bare functions.

This already found a few usages that had inconsistently used atomic functions on some values.

Comment on lines +401 to +402
msg.Offset = pc.suppressedHighWaterMarkOffset
pc.suppressedHighWaterMarkOffset++
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rechecked this, and yes, the usage is indeed always made under lock.

Comment on lines +381 to +384
t *testing.T
clientID string
isCapped bool
sink *testFuncConsumerGroupSink
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are set at initialisation and never changed after, and thus can be accessed freely without mutex.

Comment on lines +392 to +393
claims map[string]int
errs []error
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are the two fields that can update after initialization, and are already correctly protected by mutexes. Their movement to here is just to match convention of putting mutex protected values below the mutex that protects them.

@puellanivis puellanivis force-pushed the chore-finish-up-atomic-usage branch from 1269371 to 0c3df26 Compare December 2, 2025 14:36
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.

1 participant