Conversation
segment.go
Outdated
| // increase capacity and limit entry len. | ||
| for hdr.valCap < hdr.valLen { | ||
| hdr.valCap = hdr.valLen | ||
| hdr.valCap *= hdr.valCap |
|
@zhangcunli |
cache.go
Outdated
| if entry == nil { | ||
| break | ||
| } | ||
| entryCount = atomic.AddInt64(&entryCount, 1) |
There was a problem hiding this comment.
Why atomic.AddUint64 ? There is no concurrent access to local variable.
Why this function were changed at all? Can you prove there is a need to change this function?
|
@zhangcunli any update? |
|
Modify the ringbuffer resize, ringbuffer_test.go: |
add method Resize
newSize >= oldSize, keep all entry
newSie < oldSize, discard all entry;
bug, case: