Closed linchuan4028 closed 3 years ago
Can you please provide a bit more information about the environment in which this happened? Was it tests? Did you compile via -race
switch?
It's on prd env. No compile via -race.
Can you paste the whole panic stack trace? Especially the error message.
the code segment in connenction_heap.go
// DropIdleTail closes idle connection in tail.
// It will return true if tail connection was idle and dropped
func (h *singleConnectionHeap) DropIdleTail() bool {
h.mutex.Lock()
defer h.mutex.Unlock()
// if heap is not empty
if h.full || (h.tail != h.head) {
conn := h.data[(h.tail+1)%h.size]
below is the stack value
*github.com/aerospike/aerospike-client-go.singleConnectionHeap {
head: 0,
tail: 0,
data: []*github.com/aerospike/aerospike-client-go.Connection len: 0, cap: 0, nil,
size: 32,
full: true,
mutex: sync.Mutex {state: 0, sema: 0},}
this line conn := h.data[(h.tail+1)%h.size]
show index out of range
Thanks for the report, I'm on it.
This should be fixed in the latest v3.3.1 release. Thanks for your patience.