google / google/leveldb

LevelDB get stuck in leveldb::DBImpl::MakeRoomForWrite() for 1.13

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

Description

## logs
```
11:09:19.149 Recovering log #1386627
11:09:19.273 Level-0 table #1386630: started
11:09:19.366 Level-0 table #1386630: 5214066 bytes OK
11:09:19.376 Delete type=3 #1381048
11:09:19.378 Delete type=0 #1386627
11:16:22.422 Current memtable full; waiting...
```
## config
writeBufferSize 16 M, cacheSize 32 M, maxOpenFiles 100

## size
level:0,files:1.0,size:5.0 M

## version
1.13, use [leveldbjni](https://github.com/fusesource/leveldbjni)
## situation

Java process was killer by OOM Killer, The above logs did not show database corruption. It get get stuck in leveldb::DBImpl::MakeRoomForWrite() . BTW , recreate database is ok. Anyone might know the reason?
## relations
I looked up other issues, found this issue https://github.com/google/leveldb/issues/169 . However, this doesn't seem like the case here.
In rocksdb , https://github.com/facebook/rocksdb/issues/696#issuecomment-134667686, this comment show `had a bug where compaction wasn't started and writes were waiting until it finishes.`

Contributor guide

Open the contributing guide

Research direction

Start at leveldb::DBImpl::MakeRoomForWrite() and correlate its waiting behavior with the supplied recovery logs and configuration. Review issue 169 and the linked RocksDB discussion for related compaction behavior. Done means identifying a reproducible root cause and validating a corrective change without database recreation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.