Skip to content

Conversation

@etschannen
Copy link
Contributor

By receiving messages from the network at a high priority, we can track the number of requests outstanding, and if the proxy already has too many requests, send an error instead of responding to the message.

If a 6.2.18 or lower client sees this error from a GRV call, it will see database_locked or transaction_too_old errors instead of the proxy_memory_limit_exceeded error.

@etschannen
Copy link
Contributor Author

closes #2792


bool operator == (const RequestStream<T>& rhs) const { return queue == rhs.queue; }
bool isEmpty() const { return !queue->isReady(); }
uint32_t size() const { return queue->size(); }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this is added but not used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, at one point I actually used it, but figured it was still probably a good function so I left it in

Copy link
Contributor

@ajbeamon ajbeamon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the priority changes make us more vulnerable to CPU starvation at higher numbers of requests. We could probably minimize that by limiting the work done with each request at ReadSocket priority to only be the logic that lets it into the queue or rejects it.

@ajbeamon
Copy link
Contributor

Rejected requests may be a useful metric for status.

@etschannen
Copy link
Contributor Author

add errors to status

@etschannen etschannen merged commit ed4d02a into apple:release-6.2 Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants