[MB-3972] setting a new value for an expired item before the pager cleans up the value from memory causes memory leak Created: 08/Jun/11  Updated: 10/Apr/12  Resolved: 14/Jul/11

Status: Closed
Project: Couchbase Server
Component/s: couchbase-bucket
Affects Version/s: 1.6.5.3
Fix Version/s: 1.7.1
Security Level: Public

Type: Bug Priority: Major
Reporter: Farshid Ghods (Inactive) Assignee: Chiyoung Seo
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
this can cause a huge memory spike
example

while True:
mc.set(key,1,0,..)

we do not overwrite the value in kv table because expiration is less than 3 so for every set we end up creating a new value in the kv table

this is not a real use case but is seen very often while testing ( e.g a script sent by one of the customers was causing this issue)

for example if you have a working set of 4000 keys ( data 400 mb) and you loop 400 times and invoke a mc.set(key,2,..) after 10 minutes you will end up with 4x400Mb


 Comments   
Comment by Farshid Ghods (Inactive) [ 08/Jun/11 ]
the workaround is to use larger expiration values (>5)
Comment by Farshid Ghods (Inactive) [ 08/Jun/11 ]
we end up with duplicate keys in the database with different expiration times.
Comment by Farshid Ghods (Inactive) [ 16/Jun/11 ]
Integrated in github-ep-engine-1-7-1 #123 (See [http://qa.hq.northscale.net/job/github-ep-engine-1-7-1/123/])
    MB-3972 Set should overwrite an expired item that is not purged yet

Chiyoung Seo :
Files :
* stored-value.hh
* ep_testsuite.cc
Comment by Farshid Ghods (Inactive) [ 06/Jul/11 ]
Integrated in github-ep-engine-2-0 #13 (See [http://qa.hq.northscale.net/job/github-ep-engine-2-0/13/])
    MB-3972 Set should overwrite an expired item that is not purged yet

Chiyoung Seo :
Files :
* stored-value.hh
* ep_testsuite.cc
Generated at Fri Jul 11 05:47:23 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.