8000 Cleanup in preparation for Replication 2.0 transaction handling (try #2) by goedderz · Pull Request #14907 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Cleanup in preparation for Replication 2.0 transaction handling (try #2) #14907

New i 8000 ssue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed compile error
  • Loading branch information
goedderz committed Oct 28, 2021
commit d4963ffb6136eee84eb59fc906fd36252578f49b
8 changes: 8 additions & 0 deletions arangod/Transaction/Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@

using namespace arangodb::transaction;

// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
uint64_t Options::defaultMaxTransactionSize =
std::numeric_limits<decltype(Options::defaultMaxTransactionSize)>::max();
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
uint64_t Options::defaultIntermediateCommitSize = std::uint64_t{512} * 1024 * 1024; // 1 << 29
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
uint64_t Options::defaultIntermediateCommitCount = 1'000'000;

Options::Options() {
// if we are a coordinator, fill in our own server id/reboot id.
// the data is passed to DB servers when the transaction is started
Expand Down
8 changes: 3 additions & 5 deletions arangod/Transaction/Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,9 @@ struct Options {
bool isIntermediateCommitEnabled() const noexcept;

static constexpr double defaultLockTimeout = 900.0;
static constexpr std::uint64_t defaultMaxTransactionSize =
std::numeric_limits<decltype(defaultMaxTransactionSize)>::max();
static constexpr std::uint64_t defaultIntermediateCommitSize =
std::uint64_t{1} << 29U; // 512 * 1024 * 1024
static constexpr std::uint64_t defaultIntermediateCommitCount = 1'000'000;
static std::uint64_t defaultMaxTransactionSize; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
static std::uint64_t defaultIntermediateCommitSize; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
static std::uint64_t defaultIntermediateCommitCount; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)

/// @brief time (in seconds) that is spent waiting for a lock
double lockTimeout = defaultLockTimeout;
Expand Down
0