mirror of https://gitee.com/bigwinds/arangodb
make property protected
This commit is contained in:
parent
ffa5e2aa54
commit
b4027dc02c
|
@ -36,7 +36,7 @@
|
|||
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
|
||||
|
||||
#define LOG_TRX(trx, level) \
|
||||
LOG_TOPIC(TRACE, arangodb::Logger::FIXME) << "trx #" << trx->_id << "." << level << " (" << transaction::statusString(trx->_status) << "): "
|
||||
LOG_TOPIC(TRACE, arangodb::Logger::FIXME) << "trx #" << trx->id() << "." << level << " (" << transaction::statusString(trx->_status) << "): "
|
||||
|
||||
#else
|
||||
|
||||
|
@ -68,6 +68,7 @@ class TransactionState {
|
|||
bool isCoordinator() const { return ServerState::isCoordinator(_serverRole); }
|
||||
|
||||
TRI_vocbase_t* vocbase() const { return _vocbase; }
|
||||
TRI_voc_tid_t id() const { return _id; }
|
||||
|
||||
double timeout() const { return _timeout; }
|
||||
void timeout(double value) {
|
||||
|
@ -147,7 +148,11 @@ class TransactionState {
|
|||
|
||||
public:
|
||||
TRI_vocbase_t* _vocbase; // vocbase
|
||||
|
||||
protected:
|
||||
TRI_voc_tid_t _id; // local trx id
|
||||
|
||||
public:
|
||||
AccessMode::Type _type; // access type (read|write)
|
||||
transaction::Status _status; // current status
|
||||
|
||||
|
|
|
@ -606,14 +606,12 @@ transaction::Methods::~Methods() {
|
|||
|
||||
// free the state associated with the transaction
|
||||
TRI_ASSERT(getStatus() != transaction::Status::RUNNING);
|
||||
auto id = _state->_id;
|
||||
bool hasFailedOperations = _state->hasFailedOperations();
|
||||
// store result
|
||||
_transactionContextPtr->storeTransactionResult(_state->id(), _state->hasFailedOperations());
|
||||
_transactionContextPtr->unregisterTransaction();
|
||||
|
||||
delete _state;
|
||||
_state = nullptr;
|
||||
|
||||
// store result
|
||||
_transactionContextPtr->storeTransactionResult(id, hasFailedOperations);
|
||||
_transactionContextPtr->unregisterTransaction();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ CollectionNameResolver const* TransactionContext::createResolver() {
|
|||
|
||||
/// @brief unregister the transaction
|
||||
/// this will save the transaction's id and status locally
|
||||
void TransactionContext::storeTransactionResult(TRI_voc_tid_t id, bool hasFailedOperations) {
|
||||
void TransactionContext::storeTransactionResult(TRI_voc_tid_t id, bool hasFailedOperations) noexcept {
|
||||
TRI_ASSERT(_transaction.id == 0);
|
||||
|
||||
_transaction.id = id;
|
||||
|
|
|
@ -104,7 +104,7 @@ class TransactionContext {
|
|||
|
||||
/// @brief unregister the transaction
|
||||
/// this will save the transaction's id and status locally
|
||||
void storeTransactionResult(TRI_voc_tid_t, bool);
|
||||
void storeTransactionResult(TRI_voc_tid_t id, bool hasFailedOperations) noexcept;
|
||||
|
||||
/// @brief get a custom type handler
|
||||
virtual std::shared_ptr<VPackCustomTypeHandler> orderCustomTypeHandler() = 0;
|
||||
|
|
Loading…
Reference in New Issue