How TransactionDB replicates?
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
> Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://groups.google.com/forum/#!forum/rocksdb or https://www.facebook.com/groups/rocksdb.dev
### Expected behavior
rocksdb::WriteBatch write_batch(iter->GetBatch().writeBatchPtr->Data());
status = db->Write(rocksdb::WriteOptions(), &write_batch);
Write operation succeeded.
### Actual behavior
Invalid argument: MarkNoop() handler not defined.
### Steps to reproduce the behavior
`int main()
{
std::string db_dir = "./transaction_db_test/";
rocksdb::Options options;
rocksdb::TransactionDBOptions toptions;
options.OptimizeForSmallDb();
options.create_if_missing = true;
rocksdb::TransactionDB *db = nullptr;
auto status = rocksdb::TransactionDB::Open(options, toptions, db_dir, &db);
if (!status.ok())
{
std::cout << "Open failed " << status.ToString() << std::endl;
return 0;
}
db->Put(rocksdb::WriteOptions(), "abc", "123");
std::unique_ptr iter;
status = db->GetUpdatesSince(0, &iter, rocksdb::TransactionLogIterator::ReadOptions());
if (!status.ok())
{
std::cout << "GetUpdatesSince failed " << status.ToString() << std::endl;
return 0;
}
for (; iter->Valid(); iter->Next())
{
rocksdb::WriteBatch write_batch(iter->GetBatch().writeBatchPtr->Data());
status = db->Write(rocksdb::WriteOptions(), &write_batch);
if (!status.ok())
{
std::cout << "Write failed " << status.ToString() << std::endl;
return 0;
}
}
return 0;
}`
Contributor guide
Assessment
This issue has not been assessed yet.