Details
-
Bug
-
Resolution: Fixed
-
Major
-
6.6.0, 6.6.1, 6.6.2, 6.6.3, 6.6.4, 6.6.5, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.1.0, 7.1.1
-
Security Level: Public
-
Untriaged
-
1
-
No
Description
- XDCR receives ENOMEM and prepares the packet for resend (http://src.couchbase.org/source/xref/6.6.2/goproj/src/github.com/couchbase/goxdcr/parts/xmem_nozzle.go#2041)
- Leading to this call to get bytes: http://src.couchbase.org/source/xref/6.6.2/goproj/src/github.com/couchbase/goxdcr/parts/xmem_nozzle.go#2426-2427
- At first glance, the above looks to be using a slice reference, but digging into gomemcached…
- http://src.couchbase.org/source/xref/6.6.2/godeps/src/github.com/couchbase/gomemcached/mc_req.go#104-118 <- this call actually make copies of the data
So even if the stats do not move (i.e. the analysis I’ve shown), and yet target keeps returning ENOMEM (and potentially TMPFAIL), XDCR will keep retrying to resend…. but each resend actually allocates memory instead of reusing existing ones.
Attachments
Issue Links
- is a backport of
-
MB-56850 [BP 7.1.5] - XDCR - Prolonged TMPFAIL or ENOMEM could lead to memory bloat
-
- Closed
-
For Gerrit Dashboard: MB-53065 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
177849,1 | MB-53065: reuse allocated byte slice when retrying due to target temp errors | master | goxdcr | Status: ABANDONED | 0 | 0 |
177850,1 | MB-53065: reuse allocated byte slice when retrying due to target temp errors | neo | goxdcr | Status: ABANDONED | 0 | 0 |
177851,1 | MB-53065: Add BytesPreallocated method | master | gomemcached | Status: ABANDONED | 0 | 0 |
185285,1 | MB-53065: Add BytesPreallocated method | neo | gomemcached | Status: MERGED | +2 | +1 |
185286,2 | MB-53065: reuse allocated byte slice when retrying due to target temp errors | neo | goxdcr | Status: MERGED | +2 | +1 |