Skip to content

Commit

Permalink
Revert "Apply transaction batches in periodic intervals (#4504)" (#4852)
Browse files Browse the repository at this point in the history
This reverts commit 002893f.

There were two files with conflicts in the automated revert:

- src/ripple/rpc/impl/RPCHelpers.h and
- src/test/rpc/JSONRPC_test.cpp

Those files were manually resolved.
  • Loading branch information
scottschurr committed Dec 20, 2023
1 parent ffb53f2 commit c53a5e7
Show file tree
Hide file tree
Showing 24 changed files with 163 additions and 398 deletions.
1 change: 0 additions & 1 deletion Builds/CMake/RippledCore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ install (
src/ripple/basics/StringUtilities.h
src/ripple/basics/TaggedCache.h
src/ripple/basics/tagged_integer.h
src/ripple/basics/SubmitSync.h
src/ripple/basics/ThreadSafetyAnalysis.h
src/ripple/basics/ToString.h
src/ripple/basics/UnorderedContainers.h
Expand Down
2 changes: 1 addition & 1 deletion cfg/rippled-example.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@
#
# Configure the maximum number of transactions to have in the job queue
#
# Must be a number between 1000 and 100000, defaults to 10000
# Must be a number between 100 and 1000, defaults to 250
#
#
# [overlay]
Expand Down
2 changes: 1 addition & 1 deletion cfg/rippled-reporting.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@
#
# Configure the maximum number of transactions to have in the job queue
#
# Must be a number between 1000 and 100000, defaults to 10000
# Must be a number between 100 and 1000, defaults to 250
#
#
# [overlay]
Expand Down
33 changes: 15 additions & 18 deletions src/ripple/app/ledger/impl/LedgerMaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,25 +549,22 @@ void
LedgerMaster::applyHeldTransactions()
{
std::lock_guard sl(m_mutex);
// It can be expensive to modify the open ledger even with no transactions
// to process. Regardless, make sure to reset held transactions with
// the parent.
if (mHeldTransactions.size())
{
app_.openLedger().modify([&](OpenView& view, beast::Journal j) {
bool any = false;
for (auto const& it : mHeldTransactions)
{
ApplyFlags flags = tapNONE;
auto const result =
app_.getTxQ().apply(app_, view, it.second, flags, j);
if (result.second)
any = true;
}
return any;
});
}

app_.openLedger().modify([&](OpenView& view, beast::Journal j) {
bool any = false;
for (auto const& it : mHeldTransactions)
{
ApplyFlags flags = tapNONE;
auto const result =
app_.getTxQ().apply(app_, view, it.second, flags, j);
if (result.second)
any = true;
}
return any;
});

// VFALCO TODO recreate the CanonicalTxSet object instead of resetting
// it.
// VFALCO NOTE The hash for an open ledger is undefined so we use
// something that is a reasonable substitute.
mHeldTransactions.reset(app_.openLedger().current()->info().parentHash);
Expand Down
1 change: 0 additions & 1 deletion src/ripple/app/main/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,6 @@ ApplicationImp::start(bool withTimers)
{
setSweepTimer();
setEntropyTimer();
m_networkOPs->setBatchApplyTimer();
}

m_io_latency_sampler.start();
Expand Down
Loading

0 comments on commit c53a5e7

Please sign in to comment.