-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix RPC Webhook queue dropping #5163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
15a7863
2252d4f
4c4527b
9bc8719
0f9b3e1
b6a7c65
d9ce153
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,13 +80,6 @@ class RPCSubImp : public RPCSub | |
{ | ||
std::lock_guard sl(mLock); | ||
|
||
if (mDeque.size() >= eventQueueMax) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unbound queues are often trouble. In this particular case, because it's protected by the ADMIN role, perhaps this is acceptable. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep exactly my thinking. It's an admin command. If -as an admin- you want to dump a ton in the queue, be our guest? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about increasing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mvadari What is reasonable? Theoretically I'd want to subscribe to all transactions, and theoretically that's 1000? 1500? 2000? 3000? per ledger? Why would we limit that? If you don't want that or don't have the resources to process it, don't subscribe to it on the admin command. If you do, why put a limit in place? And then what would be a reasonable limit? It is an admin command. Don't do stupid things. If you're an admin, there are a million other things not to screw up. On an OS level. Service level. Security level. Making rippled send a lot of webhooks is the least of your worries. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bump @WietseWind There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is still an issue imo. Let's at least agree why this is ok or address it in some way. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO, there is no reasonable limit given the ledger's potential growth. Assuming this is only relevant for admins, any potential issues are mitigated. It's not like anybody is going to be running this on a UNL validator. I would like to see some analysis that shows that it's only relevant for admins. Either way, ledgers are getting bigger, so a single hard-coded value ain't going to cut it. Another potential solution would be instead of a hard-coded |
||
{ | ||
// Drop the previous event. | ||
JLOG(j_.warn()) << "RPCCall::fromNetwork drop"; | ||
mDeque.pop_back(); | ||
} | ||
|
||
auto jm = broadcast ? j_.debug() : j_.info(); | ||
JLOG(jm) << "RPCCall::fromNetwork push: " << jvObj; | ||
|
||
|
@@ -184,8 +177,6 @@ class RPCSubImp : public RPCSub | |
} | ||
|
||
private: | ||
enum { eventQueueMax = 32 }; | ||
|
||
boost::asio::io_service& m_io_service; | ||
JobQueue& m_jobQueue; | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.