Repository navigation
test(nlp): stop copying the atomic lookupNum in synonym tests - #21102
Conversation
go vet flags the by-value copy of Synonym.lookupNum (an atomic.Int64) in TestSynonymLoadNoRedis: copying an atomic value violates the noCopy contract. Read it with Load() instead of assigning the field. Closes infiniflow#21098
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Fixes #21098.
What problem does this PR solve?
go vet ./internal/service/nlpfails:Synonym.lookupNumis anatomic.Int64value field.TestSynonymLoadNoRediscopies it by value, which violates thenoCopycontract thatatomic.Int64exists to catch.What is changed?
Read the value with
Load()instead of copying the field:Verification
Type of change