Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Membase | Membase Server 1.7.x

Odd curr_items behaviour when setting expiration

1 reply [Last post]
  • Login or register to post comments
Thu, 06/30/2011 - 08:41
kieren
Offline
Joined: 06/02/2011
Groups: None

Hi,

I'm seeing some odd behaviour with curr_items i can't explain...

When using membase buckets if i set an expiry on a key, wait for it to expire then set the same key, the curr_items (and vb_active_curr_items) keeps increasing. Setting the same key before the expiry works as i expected (ie; curr_items doesn't increment).

It gets even weirder when deleting it - DELETEing the same key over and over decrements curr_items as if the key has been stored multiple times.

c> SET testkey1 0 10 1
a
s> STAT curr_items 1
 
(wait 10s)
c> SET testkey1 0 10 1
a                                                                                                                                                                                     
s> STAT curr_items 2
 
(wait 10s)
c> SET testkey1 0 10 1
a
s> STAT curr_items 3
 
 
c> DELETE testkey1
s> DELETED
s> STAT curr_items 2
c> DELETE testkey1
s> NOT_FOUND
s> STAT curr_items 1
c> DELETE testkey1
s> NOT_FOUND
s> STAT curr_items 0

Is this expected? Is the key actually being stored multiple times (it seems that way, or at least it seems to have this stack-like behaviour per key)?

I'm running 1.7GA and see the same effect either on a single node or cluster (with or without replication). I've tried with telnet and a PHP client. Memcache buckets don't seem to increment curr_items after the expiry has passed.

Is this normal?

Thanks,
-kieren

Top
  • Login or register to post comments
Thu, 06/30/2011 - 08:58
farshid
Offline
Joined: 04/25/2011
Groups:

kieren,

>>When using membase buckets if i set an expiry on a key, wait for it to expire then set the same key, the curr_items (and vb_active_curr_items) keeps increasing. Setting >>the same key before the expiry works as i expected (ie; curr_items doesn't increment).

In general items which do expire are flushed out of memory every 60 minutes ( its a parameter passed to ep-engine during memcached startup)

"
set x , expiry = 40 mins
after 80 mins ( item has already been flushed from memory)
set x again expiry = 40 mins
"

>>Is this expected? Is the key actually being stored multiple times (it seems that way, or at least it seems to have this stack-like behaviour per key)?

it is not expected per design but it is a known issue in 1.7.0 release ( with the fix already coming in in 1.7.1 release) that if you set the item again before expiry pager flushed the item out of memory membase tends to create a new object in memory instead of replacing the old one
http://www.couchbase.org/issues/browse/MB-3972

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker