我要评分
获取效率
正确性
完整性
易理解

Verifying RocksDB

  1. Verify RocksDB using a tool.
    1
    mkdir -p /home/rocksdb/rkdb
    
    1
    ldb --db=/home/rocksdb/rkdb --create_if_missing put k1 v1
    
    1
    ls /home/rocksdb/rkdb
    

    When a small amount of data is written to the memtable, no sst file exists.

    1
    ldb --db=/home/rocksdb/rkdb batchput k2 v2 k3 aaaaa k4 bbbbb k5 ccccc
    
    1
    ls /home/rocksdb/rkdb
    

    After multiple groups of data are written, the data is flushed from the memory to drives; then an sst file is generated in the database.

  2. View data in the RocksDB database.
    1
    ldb --db=/home/rocksdb/rkdb scan
    

    For details about other verification operations, see Verifying RocksDB APIs.