google / leveldb

LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.
BSD 3-Clause "New" or "Revised" License
36.53k stars 7.82k forks source link

memory increasing when using LRUCache in different threads #231

Open cmumford opened 10 years ago

cmumford commented 10 years ago

Original issue 225 created by zhaoqi1861 on 2014-02-12T08:01:33.000Z:

What steps will reproduce the problem?

  1. Db is started in the main thread. A LRUCache is assigned to the db.
  2. Start a new thread, traverse the db by using iterator. So data are loaded into lrucache. This thread does not exit.
  3. do step 2 repeatlly.

What is the expected output? What do you see instead? Memory usage should stop increase after the first time iterating db. Instead, memory usage increase all the time.

What version of the product are you using? On what operating system? I'm using leveldb 1.14.0 on centos

Please provide any additional information below. Attached is a test code to reproduce this problem

brahmareddybattula commented 8 years ago

Is this solved..?