0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-29 20:28:52 +02:00

ircd::db: Removed unused cell features.

This commit is contained in:
Jason Volk 2018-05-17 19:20:30 -07:00
parent 99553dd7e7
commit 296eff7c5d
2 changed files with 0 additions and 44 deletions

View file

@ -76,10 +76,6 @@ struct ircd::db::cell
// [SET] assign cell
cell &operator=(const string_view &);
// [GET] -> [SET] assign cell (atomic)
bool compare_exchange(string_view &expected, const string_view &desired);
string_view exchange(const string_view &desired);
// [GET] load cell only (returns valid)
bool load(const string_view &index = {}, gopts = {});

View file

@ -3462,50 +3462,10 @@ ircd::db::cell::load(const string_view &index,
this->ss = std::move(opts.snapshot);
}
std::unique_ptr<rocksdb::TransactionLogIterator> tit;
throw_on_error(d.d->GetUpdatesSince(0, &tit));
while(tit && tit->Valid())
{
auto batchres(tit->GetBatch());
//std::cout << "seq: " << batchres.sequence;
if(batchres.writeBatchPtr)
{
auto &batch(*batchres.writeBatchPtr);
//std::cout << " count " << batch.Count() << " ds: " << batch.GetDataSize() << " " << batch.Data() << std::endl;
}
tit->Next();
}
database::column &c(this->c);
return seek(c, index, opts, this->it);
}
ircd::string_view
ircd::db::cell::exchange(const string_view &desired)
{
const auto ret(val());
(*this) = desired;
return ret;
}
bool
ircd::db::cell::compare_exchange(string_view &expected,
const string_view &desired)
{
const auto existing(val());
if(expected.size() != existing.size() ||
memcmp(expected.data(), existing.data(), expected.size()) != 0)
{
expected = existing;
return false;
}
expected = existing;
(*this) = desired;
return true;
}
ircd::db::cell &
ircd::db::cell::operator=(const string_view &s)
{