fix: Remove fatal assertion on Linux thread name truncation (#6690)

This commit is contained in:
Valentin Balaschenko
2026-04-01 17:56:45 +01:00
committed by GitHub
parent 29e49abd3c
commit 6e2452207d
2 changed files with 3 additions and 6 deletions

View File

@@ -95,11 +95,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
}

View File

@@ -56,8 +56,10 @@ OrderBookDBImpl::setup(std::shared_ptr<ReadView const> const& 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)
registry_.get().getJobQueue().addJob(
jtUPDATE_PF, "OBUpd" + std::to_string(ledger->seq()), [this, ledger]() {
jtUPDATE_PF, "OB" + std::to_string(ledger->seq() % 1000000000), [this, ledger]() {
update(ledger);
});
}