SortedLedgerStorage creates too many entrylog files
- Dominant language
- Java
- Stars
- 2k
- Forks
- 976
- Avg merge
- 6d 15h
- Merged PRs (30d)
- 7
Description
*BUG REPORT*
***Describe the bug***
Recently our production bookie encounters 'too many open files' error, we found bookie create much more entrylog file files than we expected, and the metric bookie.bookie_gc_ACTIVE_ENTRY_LOG_COUNT_gauge like this,

There are many files which is very small and not satisfy 1GB size.

we use the **SortedLedgerStorage** and entryLogPerLedgerEnabled is **false**.
we use arthas to track the create entrylog logic and found this:

It seems InterleavedLedgerStorage will re-startcheckpoint during rotate entrylog, this may cause memtable flush some bytes during perivous and this checkpoin, and createNewlog is invoked again, this situation will keep loop and cannot be broken.

Please confirm is it a bug or not, if you need more information, please tell me.
Thanks.
Contributor guide
Assessment
This issue has not been assessed yet.