Skip to content

Commit 287c01a

Browse files
authored
Improve Admin command RPC Post (XRPLF#384)
* Improve ADMIN HTTP POST RPC notifications: no queue limit, shorter HTTP call TTL
1 parent 4239124 commit 287c01a

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

src/ripple/net/impl/RPCCall.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -1894,7 +1894,9 @@ fromNetwork(
18941894
constexpr auto RPC_REPLY_MAX_BYTES = megabytes(256);
18951895

18961896
using namespace std::chrono_literals;
1897-
auto constexpr RPC_NOTIFY = 10min;
1897+
// auto constexpr RPC_NOTIFY = 10min; // Wietse: lolwut 10 minutes for one
1898+
// HTTP call?
1899+
auto constexpr RPC_NOTIFY = 30s;
18981900

18991901
HTTPClient::request(
19001902
bSSL,

src/ripple/net/impl/RPCSub.cpp

+10-7
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,14 @@ class RPCSubImp : public RPCSub
7878
{
7979
std::lock_guard sl(mLock);
8080

81-
if (mDeque.size() >= eventQueueMax)
82-
{
83-
// Drop the previous event.
84-
JLOG(j_.warn()) << "RPCCall::fromNetwork drop";
85-
mDeque.pop_back();
86-
}
81+
// Wietse: we're not going to limit this, this is admin-port only, scale
82+
// accordingly Dropping events just like this results in inconsistent
83+
// data on the receiving end if (mDeque.size() >= eventQueueMax)
84+
// {
85+
// // Drop the previous event.
86+
// JLOG(j_.warn()) << "RPCCall::fromNetwork drop";
87+
// mDeque.pop_back();
88+
// }
8789

8890
auto jm = broadcast ? j_.debug() : j_.info();
8991
JLOG(jm) << "RPCCall::fromNetwork push: " << jvObj;
@@ -182,7 +184,8 @@ class RPCSubImp : public RPCSub
182184
}
183185

184186
private:
185-
enum { eventQueueMax = 32 };
187+
// Wietse: we're not going to limit this, this is admin-port only, scale
188+
// accordingly enum { eventQueueMax = 32 };
186189

187190
boost::asio::io_service& m_io_service;
188191
JobQueue& m_jobQueue;

0 commit comments

Comments
 (0)