mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-27 00:50:45 +00:00
fix: Remove fatal assertion on Linux thread name truncation (#6690)
This commit is contained in:
committed by
Ed Hennis
parent
c7a2c3d25a
commit
df573c265c
@@ -119,11 +119,6 @@ setCurrentThreadNameImpl(std::string_view name)
|
||||
std::cerr << "WARNING: Thread name \"" << name << "\" (length "
|
||||
<< name.size() << ") exceeds maximum of "
|
||||
<< maxThreadNameLength << " characters on Linux.\n";
|
||||
|
||||
XRPL_ASSERT(
|
||||
false,
|
||||
"beast::detail::setCurrentThreadNameImpl : Thread name exceeds "
|
||||
"maximum length for Linux");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1031,7 +1031,7 @@ pendSaveValidated(
|
||||
if (!isSynchronous &&
|
||||
app.getJobQueue().addJob(
|
||||
isCurrent ? jtPUBLEDGER : jtPUBOLDLEDGER,
|
||||
std::to_string(ledger->seq()),
|
||||
"Pub" + std::to_string(ledger->seq()),
|
||||
[&app, ledger, isCurrent]() {
|
||||
saveValidatedLedger(app, ledger, isCurrent);
|
||||
}))
|
||||
|
||||
@@ -67,9 +67,12 @@ OrderBookDB::setup(std::shared_ptr<ReadView const> const& ledger)
|
||||
update(ledger);
|
||||
else
|
||||
{
|
||||
// Shorten job name to fit Linux 15-char thread name limit with "j:"
|
||||
// prefix "OB" + seq (max 9 digits) = 11 chars, + "j:" = 13 chars
|
||||
// (fits in 15)
|
||||
app_.getJobQueue().addJob(
|
||||
jtUPDATE_PF,
|
||||
"OBUpd" + std::to_string(ledger->seq()),
|
||||
"OB" + std::to_string(ledger->seq() % 1000000000),
|
||||
[this, ledger]() { update(ledger); });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user