Details
-
Bug
-
Resolution: Fixed
-
Critical
-
5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.1.3, 5.5.0, 5.5.1, 5.5.2, 5.5.3, 5.5.4, 5.5.5, 6.0.0, 6.0.1, 6.0.2
-
Untriaged
-
Unknown
Description
Repro:
install travel-sample
run the the following query in the loop
SELECT t.airportname, t.xyz FROM `travel-sample` AS t WHERE t.type = "airport" LIMIT 100;
login into couchbase console and leave it
Run the following command you see count goes up constantly as long as query running.
curl -u Administrator:password http://localhost:8093/debug/pprof/goroutine?debug=2 | grep connCloser | wc -l
If couchbase console is closed it stops increasing.
The reason for this couchbase console runs background
select * from system:indexes;
Which calls
|
func (p *namespace) refresh(changed bool) {
|
newpool, err := p.store.client.GetPool(p.name) <====
|
}
|
|
The following call gets new pool structure and new bucketMap in refresh. |
We may need to close the old pool
|
// Release bucket connections when the pool is no longer in use func (p *Pool) Close()
|
|
func (c *Client) GetPool(name string) (p Pool, err error) {
|
var poolURI string
|
|
for _, p := range c.Info.Pools { |
if p.Name == name { |
poolURI = p.URI
|
break |
}
|
}
|
if poolURI == "" { |
return p, errors.New("No pool named " + name) |
}
|
|
err = c.parseURLResponse(poolURI, &p)
|
|
p.client = c
|
|
err = p.refresh()
|
return |
}
|
|