google / google/leveldb

memory increasing when using LRUCache in different threads

Open
#231 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
39.4k
Forks
8.2k
PR merge metrics
No merged PRs in 30d

Description

Original [issue 225](https://code.google.com/p/leveldb/issues/detail?id=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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.