Skip to content

[Bug] Core dumps are triggered by rocksdb compacting when shutdown the bookkeeper #4705

@AnonHxy

Description

@AnonHxy

BUG REPORT

Describe the bug

Core dumps are triggered rocksdb compacting when shutdown the bookkeeper process

[db-storage-cleanup-23-1:SingleDirectoryDbLedgerStorage@329] - Failed to trigger entry location index RocksDB compact
java.io.IOException: Error in RocksDB compact
    at org.apache.bookkeeper.bookie.storage.ldb.KeyValueStorageRocksDB.compact(KeyValueStorageRocksDB.java:415)
    at org.apache.bookkeeper.bookie.storage.ldb.EntryLocationIndex.compact(EntryLocationIndex.java:200)
    at org.apache.bookkeeper.bookie.storage.ldb.SingleDirectoryDbLedgerStorage.lambda$entryLocationCompact$6(SingleDirectoryDbLedgerStorage.java:327)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run(Thread.java:833)
Caused by: org.rocksdb.RocksDBException: Database shutdown
    at org.rocksdb.RocksDB.compactRange(Native Method)
    at org.rocksdb.RocksDB.compactRange(RocksDB.java:3344)
    at org.rocksdb.RocksDB.compactRange(RocksDB.java:3319)
    at org.apache.bookkeeper.bookie.storage.ldb.KeyValueStorageRocksDB.compact(KeyValueStorageRocksDB.java:407)

To Reproduce

Steps to reproduce the behavior:

  1. Setting entryLocationCompactionInterval in bk_server.conf to enable entryLocationCompaction
  2. Start the bookkeeper
  3. Try to shutdown the bookkeeper when GarbageCollectorThread is running

Expected behavior

Bookkeeper process shutdown gracefully

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions