-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
querier: check size of whole frontend response before sending it (#10154
) * Add test v1 Signed-off-by: Dimitar Dimitrov <[email protected]> * querier: check size of whole frontend response before sending it ### Background Previously we'd check the size only of the body before sending a response to the query-frontend. The reason for this check is so that we don't leave it to the gRPC library. The library returns an error and doesn't tell the server anything. This results in timeouts at the query-frontend. ### Problem Because we only check the length of the body there are edge cases where the size of the whole response (including stats & headers) exceeds the limit. The gRPC library would still refuse to send the response and the frontend would time out waiting for it. ### Is it really happening? I discovered this in tests with very small limits. But there are probably realistic cases where this is happening: the body is just below the limit, add stats and headers, and it's over the limit. Signed-off-by: Dimitar Dimitrov <[email protected]> * Add CHANGELOG.md entry Signed-off-by: Dimitar Dimitrov <[email protected]> * Remove unused param Signed-off-by: Dimitar Dimitrov <[email protected]> * remove unused param Signed-off-by: Dimitar Dimitrov <[email protected]> * Update test Signed-off-by: Dimitar Dimitrov <[email protected]> * Remove headers Signed-off-by: Dimitar Dimitrov <[email protected]> * Undo changing the flag Signed-off-by: Dimitar Dimitrov <[email protected]> * Include actual size and limit in error Signed-off-by: Dimitar Dimitrov <[email protected]> * Cancel processor context in tests Signed-off-by: Dimitar Dimitrov <[email protected]> * Increase test timeout to 1m Signed-off-by: Dimitar Dimitrov <[email protected]> * Remove comment Signed-off-by: Dimitar Dimitrov <[email protected]> --------- Signed-off-by: Dimitar Dimitrov <[email protected]>
- Loading branch information
1 parent
9b6bc36
commit ab55f55
Showing
4 changed files
with
189 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters