tikv / titan

A RocksDB plugin for key-value separation, inspired by WiscKey.
https://pingcap.com/blog/titan-storage-engine-design-and-implementation/
Apache License 2.0
488 stars 165 forks source link

Does titan support backup/checkpoint like rocksdb #205

Closed ShooterIT closed 3 years ago

ShooterIT commented 3 years ago

Hi, thanks to high performance of titan in big value scenario, compared with rocksdb. So I want to support titan as key value storage engine in our project Kvrocks. But I find some problems in using titan.

I use rocksdb::BackupEngineImpl::CreateNewBackupWithMetadata to create a backup when using titan, but i find titan directory that includes blob files doesn't be copied to backup directory, maybe I miss something, I should use other interfaces to do that. Moreover, does titan support checkpoint that can hard link blob files in titan directory?

Connor1996 commented 3 years ago

Titan doesn't support the backup/checkpoint of RocksDB. So, of course, titan directory is not included when you call rocksdb's API CreateNewBackupWithMetadata.

ShooterIT commented 3 years ago

@Connor1996 Thanks for your quick reply. I know little about tikv, I have a question, how does tikv create data snapshot and send when full replication synchronization if tikv uses titan engine? Otherwise, do you have plan to implement backup/checkpoint for titan?

Connor1996 commented 3 years ago

TiKV just scans out the range of data and generates an SST file and sends the file to the target replica. There is no difference when using Titan.

We have no plan for it. But you can send a PR to support it.

ShooterIT commented 3 years ago

@Connor1996 Thanks very much, we will have a look.

yiwu-arbug commented 3 years ago

@ShooterIT for discussion about Titan you can join tikv-wg.slack.com and then join #sig-engine channel. Thanks. I'm closing the issue.

caipengbo commented 3 years ago

Hi @ShooterIT, I added checkpoint support to Titan and created #207, hope it will be helpful to your project :)

ShooterIT commented 3 years ago

Awesome! @caipengbo