mirror of https://gitee.com/bigwinds/arangodb
Fixing export
This commit is contained in:
parent
d61cdd23ee
commit
342613bd59
|
@ -54,9 +54,11 @@ RocksDBCollectionExport::RocksDBCollectionExport(
|
|||
RocksDBCollectionExport::~RocksDBCollectionExport() {}
|
||||
|
||||
void RocksDBCollectionExport::run(uint64_t maxWaitTime, size_t limit) {
|
||||
StorageEngine* engine = EngineSelectorFeature::ENGINE;
|
||||
|
||||
// none of this should matter on rocksdb
|
||||
// try to acquire the exclusive lock on the compaction
|
||||
/*
|
||||
StorageEngine* engine = EngineSelectorFeature::ENGINE;
|
||||
engine->preventCompaction(_collection->vocbase(),
|
||||
[this](TRI_vocbase_t* vocbase) {
|
||||
// TODO: do something under compaction lock?
|
||||
|
@ -74,7 +76,7 @@ void RocksDBCollectionExport::run(uint64_t maxWaitTime, size_t limit) {
|
|||
}
|
||||
usleep(SleepTime);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
{
|
||||
SingleCollectionTransaction trx(
|
||||
|
@ -105,10 +107,14 @@ void RocksDBCollectionExport::run(uint64_t maxWaitTime, size_t limit) {
|
|||
if (limit == 0) {
|
||||
return false;
|
||||
}
|
||||
if (_collection->readDocumentConditional(&trx, token, 0, mmdr)) {
|
||||
if (_collection->readDocument(&trx, token, mmdr)) {
|
||||
_vpack.emplace_back(VPackSlice(mmdr.vpack()));
|
||||
--limit;
|
||||
}
|
||||
/*if (_collection->readDocumentConditional(&trx, token, 0, mmdr)) {
|
||||
_vpack.emplace_back(VPackSlice(mmdr.vpack()));
|
||||
--limit;
|
||||
}*/
|
||||
return true;
|
||||
});
|
||||
|
||||
|
|
|
@ -126,6 +126,7 @@ void RocksDBEngine::start() {
|
|||
_options.max_open_files = -1;
|
||||
_options.comparator = _cmp.get();
|
||||
_options.WAL_ttl_seconds = counter_sync_seconds * 2;
|
||||
// TODO: prefix_extractior + memtable_insert_with_hint_prefix
|
||||
|
||||
rocksdb::Status status =
|
||||
rocksdb::TransactionDB::Open(_options, transactionOptions, _path, &_db);
|
||||
|
|
Loading…
Reference in New Issue