Skip to content

Commit

Permalink
Enforce stricter transaction limits (#9740) (#9775)
Browse files Browse the repository at this point in the history
* Enforce stricter transaction limits (#9740)

* changelog

* make CHANGELOG entry more verbose
  • Loading branch information
graetzer authored and KVS85 committed Aug 21, 2019
1 parent 663212b commit bd5df4d
Show file tree
Hide file tree
Showing 8 changed files with 221 additions and 139 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG
@@ -1,6 +1,15 @@
v3.5.1 (XXXX-XX-XX)
-------------------

* Changes the _idle_ timeout of stream transactions to 10 seconds and the total
per DB server size of stream transaction data to 128 MB. The idle timer is
restarted after every operation in a stream transaction, so it is not the
total timeout for the transaction.

These limits were documented in the manual for stream transactions since 3.5.0,
but are enforced only as of 3.5.1. Enforcing the limits is useful to free up
resources from abandoned transactions.

* Consistently honor the return value of all attempts to queue tasks in the
internal scheduler.

Expand Down
3 changes: 1 addition & 2 deletions arangod/ClusterEngine/ClusterTransactionCollection.cpp
Expand Up @@ -35,8 +35,7 @@ ClusterTransactionCollection::ClusterTransactionCollection(TransactionState* trx
TRI_voc_cid_t cid,
AccessMode::Type accessType,
int nestingLevel)
: TransactionCollection(trx, cid, accessType, nestingLevel),
_lockType(AccessMode::Type::NONE) {}
: TransactionCollection(trx, cid, accessType, nestingLevel) {}

ClusterTransactionCollection::~ClusterTransactionCollection() {}

Expand Down
3 changes: 0 additions & 3 deletions arangod/ClusterEngine/ClusterTransactionCollection.h
Expand Up @@ -60,9 +60,6 @@ class ClusterTransactionCollection final : public TransactionCollection {

/// @brief request an unlock for a collection
int doUnlock(AccessMode::Type, int nestingLevel) override;

private:
AccessMode::Type _lockType; // collection lock type, used for exclusive locks
};
} // namespace arangodb

Expand Down
4 changes: 2 additions & 2 deletions arangod/RestHandler/RestTransactionHandler.cpp
Expand Up @@ -166,7 +166,7 @@ void RestTransactionHandler::executeBegin() {


bool parseSuccess = false;
VPackSlice body = parseVPackBody(parseSuccess);
VPackSlice slice = parseVPackBody(parseSuccess);
if (!parseSuccess) {
// error message generated in parseVPackBody
return;
Expand All @@ -175,7 +175,7 @@ void RestTransactionHandler::executeBegin() {
transaction::Manager* mgr = transaction::ManagerFeature::manager();
TRI_ASSERT(mgr != nullptr);

Result res = mgr->createManagedTrx(_vocbase, tid, body);
Result res = mgr->createManagedTrx(_vocbase, tid, slice);
if (res.fail()) {
generateError(res);
} else {
Expand Down

0 comments on commit bd5df4d

Please sign in to comment.