Skip to content

Commit

Permalink
Revert "Apply transaction batches in periodic intervals (#4504)"
Browse files Browse the repository at this point in the history
This reverts commit b580049.
  • Loading branch information
intelliot committed Aug 30, 2023
1 parent 7ca1c64 commit d943c58
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 @@ -199,7 +199,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 @@ -478,7 +478,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 @@ -467,7 +467,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 @@ -1527,7 +1527,6 @@ ApplicationImp::start(bool withTimers)
{
setSweepTimer();
setEntropyTimer();
m_networkOPs->setBatchApplyTimer();
}

m_io_latency_sampler.start();
Expand Down
Loading

0 comments on commit d943c58

Please sign in to comment.