Skip to content
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

Loki: Implement timeouts migration #7555

Merged
merged 2 commits into from
Nov 8, 2022

Conversation

DylanGuedes
Copy link
Contributor

@DylanGuedes DylanGuedes commented Oct 31, 2022

What this PR does / why we need it:
Improve the experience of migrating to our new timeouts behavior, which is the unifying of the engine:timeout and querier:query_timeout into a new configuration named limits_config:query_timeout.
This PR makes sure users won't be surprised by their timeouts being shorter, but at the same time, it makes it easier to migrate to the new configuration.

@DylanGuedes DylanGuedes force-pushed the timeouts-migration branch 2 times, most recently from 9ac5fe2 to e593d3e Compare October 31, 2022 15:24
@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0.1%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0.1%
-               loki	-0.5%

@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
- querier/queryrange	-0.1%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0.1%
-               loki	-0.5%

@DylanGuedes DylanGuedes marked this pull request as ready for review November 4, 2022 12:28
@DylanGuedes DylanGuedes requested a review from a team as a code owner November 4, 2022 12:28
Copy link
Member

@owen-d owen-d left a comment

Choose a reason for hiding this comment

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

Nit, but LGTM

pkg/loki/loki.go Outdated Show resolved Hide resolved
pkg/loki/loki.go Outdated Show resolved Hide resolved
@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0.1%
-               loki	-0.5%

@owen-d owen-d merged commit 8e38ebb into grafana:main Nov 8, 2022
changhyuni pushed a commit to changhyuni/loki that referenced this pull request Nov 8, 2022
**What this PR does / why we need it**:
Improve the experience of migrating to our new timeouts behavior, which
is the unifying of the engine:timeout and querier:query_timeout into a
new configuration named limits_config:query_timeout.
This PR makes sure users won't be surprised by their timeouts being
shorter, but at the same time, it makes it easier to migrate to the new
configuration.

Co-authored-by: Owen Diehl <[email protected]>
DylanGuedes added a commit that referenced this pull request Nov 24, 2022
**What this PR does / why we need it**:
We recently broke multitenant querying because of recent changes to how
timeouts working across Loki. This PR fixes this by:
- Adapt the timeout wrapper to work with multitenant queries. It will
take the shortest timeout across all given tenants
- Adapt the query engine timeout assigning to work with multitenant
queries. It will take the shortest timeout between all the tenants
- Adapt query sharding to use smallest max query parallelism across
given tenants
- Add a functional test to ensure multitenant is behaving as expected

Signed-off-by: DylanGuedes <[email protected]>
Signed-off-by: Mehmet Burak Devecí <[email protected]>

**Which issue(s) this PR fixes**:
#7696

**Special notes for your reviewer**:
The regression was probably introduced by
#7555
Abuelodelanada pushed a commit to canonical/loki that referenced this pull request Dec 1, 2022
**What this PR does / why we need it**:
Improve the experience of migrating to our new timeouts behavior, which
is the unifying of the engine:timeout and querier:query_timeout into a
new configuration named limits_config:query_timeout.
This PR makes sure users won't be surprised by their timeouts being
shorter, but at the same time, it makes it easier to migrate to the new
configuration.

Co-authored-by: Owen Diehl <[email protected]>
Abuelodelanada pushed a commit to canonical/loki that referenced this pull request Dec 1, 2022
**What this PR does / why we need it**:
We recently broke multitenant querying because of recent changes to how
timeouts working across Loki. This PR fixes this by:
- Adapt the timeout wrapper to work with multitenant queries. It will
take the shortest timeout across all given tenants
- Adapt the query engine timeout assigning to work with multitenant
queries. It will take the shortest timeout between all the tenants
- Adapt query sharding to use smallest max query parallelism across
given tenants
- Add a functional test to ensure multitenant is behaving as expected

Signed-off-by: DylanGuedes <[email protected]>
Signed-off-by: Mehmet Burak Devecí <[email protected]>

**Which issue(s) this PR fixes**:
grafana#7696

**Special notes for your reviewer**:
The regression was probably introduced by
grafana#7555
chaudum pushed a commit that referenced this pull request Jan 25, 2023
**What this PR does / why we need it**:
Improve the experience of migrating to our new timeouts behavior, which
is the unifying of the engine:timeout and querier:query_timeout into a
new configuration named limits_config:query_timeout.
This PR makes sure users won't be surprised by their timeouts being
shorter, but at the same time, it makes it easier to migrate to the new
configuration.

Co-authored-by: Owen Diehl <[email protected]>
chaudum pushed a commit that referenced this pull request Jan 25, 2023
**What this PR does / why we need it**:
We recently broke multitenant querying because of recent changes to how
timeouts working across Loki. This PR fixes this by:
- Adapt the timeout wrapper to work with multitenant queries. It will
take the shortest timeout across all given tenants
- Adapt the query engine timeout assigning to work with multitenant
queries. It will take the shortest timeout between all the tenants
- Adapt query sharding to use smallest max query parallelism across
given tenants
- Add a functional test to ensure multitenant is behaving as expected

Signed-off-by: DylanGuedes <[email protected]>
Signed-off-by: Mehmet Burak Devecí <[email protected]>

**Which issue(s) this PR fixes**:
#7696

**Special notes for your reviewer**:
The regression was probably introduced by
#7555
chaudum added a commit that referenced this pull request Jan 25, 2023
Co-authored-by: Dylan Guedes <[email protected]>
Co-authored-by: Owen Diehl <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants