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 Ed Hennis
parent c7a2c3d25a
commit df573c265c
3 changed files with 5 additions and 7 deletions

View File

@@ -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
}

View File

@@ -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);
}))

View File

@@ -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); });
}
}