private:
TransactionData data;
- void *osr {nullptr}; // NULL on replay
-
map<coll_t, __le32> coll_index;
map<ghobject_t, __le32> object_index;
// override default move operations to reset default values
Transaction(Transaction&& other) noexcept :
data(std::move(other.data)),
- osr(other.osr),
coll_index(std::move(other.coll_index)),
object_index(std::move(other.object_index)),
coll_id(other.coll_id),
on_applied(std::move(other.on_applied)),
on_commit(std::move(other.on_commit)),
on_applied_sync(std::move(other.on_applied_sync)) {
- other.osr = nullptr;
other.coll_id = 0;
other.object_id = 0;
}
Transaction& operator=(Transaction&& other) noexcept {
data = std::move(other.data);
- osr = other.osr;
coll_index = std::move(other.coll_index);
object_index = std::move(other.object_index);
coll_id = other.coll_id;
on_applied = std::move(other.on_applied);
on_commit = std::move(other.on_commit);
on_applied_sync = std::move(other.on_applied_sync);
- other.osr = nullptr;
other.coll_id = 0;
other.object_id = 0;
return *this;
return data.ops;
}
- void set_osr(void *s) {
- osr = s;
- }
-
- void *get_osr() {
- return osr;
- }
-
/**
* iterator
*
txc->oncommits.swap(on_commit);
for (vector<Transaction>::iterator p = tls.begin(); p != tls.end(); ++p) {
- (*p).set_osr(osr);
txc->bytes += (*p).get_num_bytes();
_txc_add_transaction(txc, &(*p));
}
OpSequencer *osr = static_cast<OpSequencer*>(ch.get());
dout(5) << __FUNC__ << ": osr " << osr << " " << *osr << dendl;
- // used to include osr information in tracepoints during transaction apply
- for (vector<Transaction>::iterator i = tls.begin(); i != tls.end(); ++i) {
- (*i).set_osr(osr);
- }
-
ZTracer::Trace trace;
if (osd_op && osd_op->pg_trace) {
osd_op->store_trace.init("filestore op", &trace_endpoint, &osd_op->pg_trace);
txc->oncommit = ondisk;
for (vector<Transaction>::iterator p = tls.begin(); p != tls.end(); ++p) {
- (*p).set_osr(osr);
txc->ops += (*p).get_num_ops();
txc->bytes += (*p).get_num_bytes();
_txc_add_transaction(txc, &(*p));