Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Loki: Modifies TableManager to use IndexGateway ring#5972

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

DylanGuedes
Copy link
Contributor

@DylanGuedesDylanGuedes commentedApr 20, 2022
edited
Loading

What this PR does / why we need it:

  • Adds a new entity indexgateway.RingManager, responsible for taking care of the index gateway ring for both, index gateway clients and servers. Now, the IndexGatewayRing service is basically a wrapper for the indexgateway.RingManager.
  • Add the IndexGatewayRing service as a dependency for the IndexGateway
  • Adds a new OwnsTenant function as a parameter to the shipper. This function replies to whether a tenant is assigned to some instance or not.
  • Modifies the TableManager to only download data from tenants assigned to it through the new OwnsTenant function.

Which issue(s) this PR fixes:
N/A

Special notes for your reviewer:
This depends on PR#5946.

Checklist

  • Documentation added
  • Tests updated
  • Is this an important fix or new feature? Add an entry in theCHANGELOG.md.
  • Changes that require user attention or interaction to upgrade are documented indocs/sources/upgrading/_index.md

- Add a new `query_readiness_duration_seconds` metric, that reports  query readiness duration of a tablemanager/index gateway instance. We  should use it later to report performance against the ring mode- Add a new `usersToBeQueryReadyForTotal` metric, that reports number of  users involved in the query readiness operation. We should use it  later to correlate number of users with the query readiness duration.
- It will report all users always for now, so it isn't too helpful the  way it is.
@DylanGuedesDylanGuedesforce-pushed thetable-manager-using-ring branch 2 times, most recently from7193545 to5551b48CompareApril 20, 2022 18:42
@DylanGuedesDylanGuedes marked this pull request as ready for reviewApril 20, 2022 21:26
@DylanGuedesDylanGuedes requested a review froma team as acode ownerApril 20, 2022 21:26
Copy link
Contributor

@JordanRushingJordanRushing left a comment

Choose a reason for hiding this comment

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

LGTM!

DylanGuedesand others added10 commitsApril 25, 2022 12:28
- Add a new `query_readiness_duration_seconds` metric, that reports  query readiness duration of a tablemanager/index gateway instance. We  should use it later to report performance against the ring mode- Add a new `usersToBeQueryReadyForTotal` metric, that reports number of  users involved in the query readiness operation. We should use it  later to correlate number of users with the query readiness duration.
- It will report all users always for now, so it isn't too helpful the  way it is.
- Separate the assigning of indexClient in the IndexGateway to allow  initializing the shipper with the IndexGateway ring- Add new TenantBoundariesClient entity, that answers if a given  tenantID should be ignored or not- Use the TenantBoundariesClient implemented by the IndexGateway in the  downloads TableManager
Signed-off-by: JordanRushing <rushing.jordan@gmail.com>
Signed-off-by: JordanRushing <rushing.jordan@gmail.com>
Rewrite QueryIndex error phrase.Co-authored-by: JordanRushing <rushing.jordan@gmail.com>
@grafanabot
Copy link
Contributor

./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.

+           ingester0%+        distributor0%+            querier0%+ querier/queryrange0%+               iter0%+            storage0%+           chunkenc0%+              logql0%-               loki-4.2%

@grafanabot
Copy link
Contributor

./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.

+           ingester0%+        distributor0.4%+            querier0%+ querier/queryrange0%+               iter0%+            storage0%+           chunkenc0%+              logql0%+               loki0%

@grafanabot
Copy link
Contributor

./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.

+           ingester0%+        distributor0%+            querier0%+ querier/queryrange0%+               iter0%+            storage0%+           chunkenc0%+              logql0%+               loki0%

@grafanabot
Copy link
Contributor

./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.

+           ingester0%+        distributor0%+            querier0%+ querier/queryrange0%+               iter0%+            storage0%+           chunkenc0%+              logql0%+               loki0%

@grafanabot
Copy link
Contributor

./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.

+           ingester0%+        distributor0.3%+            querier0%+ querier/queryrange0%+               iter0%+            storage0%+           chunkenc0%+              logql0%+               loki0%

Copy link
Contributor

@sandeepsukhanisandeepsukhani left a comment

Choose a reason for hiding this comment

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

I have added few minor nits but overall code looks great to me.

bufDescs,bufHosts,bufZones:=ring.MakeBuffersForGet()
token:=TokenFor(key,""/* labels */)
rs,err:=ringClient.Get(token,ring.WriteNoExtend,bufDescs,bufHosts,bufZones)
iferr==nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let us log the error if not nil

}

// HasDedicatedAddress specify an instance support for replying its own address.
typeHasDedicatedAddressinterface {
Copy link
Contributor

Choose a reason for hiding this comment

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

Naming is hard :)
It doesn't sound correct to me. What do you think about usingRingInstanceInfoReader or simply going back to previous implementation to pass the address directly?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Hahaha it is!

Agreed, it looks odd. I returned to pass the address directly, lmk what you think.

Document that tenant filtering is only applied during query readiness.Co-authored-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>
@grafanabot
Copy link
Contributor

./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.

+           ingester0%+        distributor0%+            querier0%+ querier/queryrange0%+               iter0%+            storage0%+           chunkenc0%+              logql0%+               loki0%

- Also removes HasDedicatedAddress, since it isn't necessary anymore
@grafanabot
Copy link
Contributor

./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.

+           ingester0%+        distributor0%+            querier0%+ querier/queryrange0%+               iter0%+            storage0%+           chunkenc0%+              logql0%+               loki0%

Copy link
Contributor

@sandeepsukhanisandeepsukhani left a comment

Choose a reason for hiding this comment

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

just a minor nit, otherwise it LGTM

@grafanabot
Copy link
Contributor

./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.

+           ingester0%+        distributor0%+            querier0%+ querier/queryrange0%+               iter0%+            storage0%+           chunkenc0%+              logql0%+               loki0.1%

Co-authored-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>
@grafanabot
Copy link
Contributor

./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.

+           ingester0%-        distributor-0.3%+            querier0%+ querier/queryrange0%+               iter0%+            storage0%+           chunkenc0%+              logql0%+               loki0.1%

Copy link
Contributor

@sandeepsukhanisandeepsukhani left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for patiently taking care of all the feedback!

DylanGuedes reacted with hooray emoji
@sandeepsukhanisandeepsukhani merged commit440fb7d intografana:mainMay 20, 2022
@osg-grafanaosg-grafana added type/docsIssues related to technical documentation; the Docs Squad uses this label across many repositories and removed area/docs labelsOct 19, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@slim-beanslim-beanslim-bean left review comments

@sandeepsukhanisandeepsukhanisandeepsukhani approved these changes

@JordanRushingJordanRushingJordanRushing approved these changes

@cyriltovenacyriltovenaAwaiting requested review from cyriltovena

@KMiller-GrafanaKMiller-GrafanaAwaiting requested review from KMiller-Grafana

Assignees

No one assigned

Labels

size/XLtype/docsIssues related to technical documentation; the Docs Squad uses this label across many repositories

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

7 participants

@DylanGuedes@sandeepsukhani@grafanabot@JordanRushing@slim-bean@chaudum@osg-grafana

[8]ページ先頭

©2009-2025 Movatter.jp