0
に動作していない私は、次のコードがありますはrocksdbを使用して::イテレータと列の家族が
rocksdb::DBWithTTL* db = ...
rocksdb::WriteOptions writeOptions;
rocksdb::ColumnFamilyHandle cfHandle = ...
std::string keyPrefix = "prefix";
std::string key = keyPrefix + "_key";
std::string value = "value";
rocksdb::Status s = db->Put(writeOptions, cfHandle, key, value);
rocksdb::ReadOptions readOptions;
readOptions.prefix_same_as_start;
readOptions.snapshot = db->GetSnapshot();
rocksdb::Iterator* iterator = db->NewIterator(readOptions);
rocksdb::Sliced start = rocksdb::Slice(keyPrefix);
for (iterator->Seek(start); iterator->Valid(); iterator->Next()) {
printf("hello");
}
printf
がヒットされることはありません。私はPut
ラインを変更した場合
しかし、:column family handle
の除去、
rocksdb::Status s = db->Put(writeOptions, key, value);
意味、私はライン印刷罰金を取得しています。
イテレータAPIが列ファミリを考慮する必要があると推測していますが、ドキュメントが見つかりませんでした。