Description
According to Adam:
"When running Sync Gateway against the latest go-memcached, it's panicking on the extended metadata processing added with https://github.com/couchbase/gomemcached/commit/f4caed221d0550525f11a843e22855b6582ef116.
It's failing when trying to process documents without extended metadata, but the calculation of the body length is incorrect, so the line https://github.com/couchbase/gomemcached/blob/master/mc_req.go#L181:
req.Body
= buf[klen+elen : klen+elen+valueLen]
is panicking. It looks to me like the calculation of bodyLen (which is what valueLen is based on) should be getting done after elen is updated here: https://github.com/couchbase/gomemcached/blob/master/mc_req.go#L169. This wasn't previously an issue, as Body was just getting calculated as:
req.Body
= buf[klen+elen:]"
The panic went away after the proposed fix.
Attachments
Issue Links
- blocks
-
MB-19612 4.5.1 Minor Release
- Closed