Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
1
Description
Version: gocbcore v9.0.7
Couchbase server version: 7.0.0
Problem
If the returned stat response has no key then gocbcore ignores the returned value. This is the incorrect behaviour as the binary documentation says
The sequence of return packets is terminated with a packet that contains no key and no value.
But looking at the gocbcore code we have
// Check if the key length is zero. This indicates that we have reached
|
// the ending of the stats listing by this server.
|
if len(resp.Key) == 0 {
|
// As this is a persistent request, we must manually cancel it to remove
|
// it from the pending ops list. To ensure we do not race multiple cancels,
|
// we only handle it as completed the one time cancellation succeeds.
|
if req.internalCancel(err) {
|
opHandledLocked()
|
}
|
|
return
|
}
|
The expectation would be to be able to retrieve the stat responses with no key.
Steps to reproduce
1. Setup a dev cluster running CC
2. Run the provided program which just prints out the connections stats
What you would expect is to get the information about the connections instead you get
RESULTS: &{Servers:map[localhost:12000:{Stats:map[] Error:<nil>}]}
|
But if you use wireshark you can see that Couchbase server did send the data but Gocbcore did not process it. As seen below
Attachments
For Gerrit Dashboard: GOCBC-1013 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
140375,4 | GOCBC-1013: Add new keys and chunks fields to stats result | master | gocbcore | Status: MERGED | +2 | +1 |