-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
use grpc for communicating with compactor for query time filtering of data requested for deletion #7804
use grpc for communicating with compactor for query time filtering of data requested for deletion #7804
Conversation
…f data requested for deletion
@sandeepsukhani You are addressing this issue btw: #7595 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Nice work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks also good to me
# Conflicts: # pkg/loki/modules.go
pkg/loki/modules.go
Outdated
@@ -713,7 +713,7 @@ func (t *Loki) supportIndexDeleteRequest() bool { | |||
func (t *Loki) compactorAddress() (string, bool, error) { | |||
if t.Cfg.isModuleEnabled(All) || t.Cfg.isModuleEnabled(Read) { | |||
// In single binary or read modes, this module depends on Server | |||
return fmt.Sprintf("127.0.0.1:%d", t.Cfg.Server.GRPCListenPort), true, nil | |||
return fmt.Sprintf("%s:%d", t.Cfg.Server.HTTPListenAddress, t.Cfg.Server.GRPCListenPort), true, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Sprintf("%s:%d", t.Cfg.Server.HTTPListenAddress, t.Cfg.Server.GRPCListenPort), true, nil | |
return fmt.Sprintf("%s:%d", t.Cfg.Server.GRPCListenAddress, t.Cfg.Server.GRPCListenPort), true, nil |
Did you mean GRPC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, sorry, my bad, messed up while merging conflicts. Thanks for noticing it and pointing it out!
**What this PR does / why we need it**: I had enabled auto-merge in PR #7804, but somehow it still merged the PR without all the checks passing. This PR fixes the failing lint and tests.
… data requested for deletion (grafana#7804) **What this PR does / why we need it**: Add grpc support to compactor for getting delete requests and gen number for query time filtering. Since these requests are internal to Loki, it would be good to use grpc instead of HTTP same as all the internal requests we do in Loki. I have added a new config for accepting the grpc address of the compactor. I tried having just the existing config and detecting if it is a grpc server, but it was hard to do it reliably, considering the different deployment modes we support. I think it is safe to keep it the same and eventually deprecate the existing config. **Checklist** - [x] Documentation added - [x] Tests updated - [x] `CHANGELOG.md` updated
**What this PR does / why we need it**: I had enabled auto-merge in PR grafana#7804, but somehow it still merged the PR without all the checks passing. This PR fixes the failing lint and tests.
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-7804-to-release-2.7.x origin/release-2.7.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 1410808ee9f20917476fabaa78aa8849ba7c7d20
# Push it to GitHub
git push --set-upstream origin backport-7804-to-release-2.7.x
git switch main
# Remove the local backport branch
git branch -D backport-7804-to-release-2.7.x Then, create a pull request where the |
… data requested for deletion (grafana#7804) **What this PR does / why we need it**: Add grpc support to compactor for getting delete requests and gen number for query time filtering. Since these requests are internal to Loki, it would be good to use grpc instead of HTTP same as all the internal requests we do in Loki. I have added a new config for accepting the grpc address of the compactor. I tried having just the existing config and detecting if it is a grpc server, but it was hard to do it reliably, considering the different deployment modes we support. I think it is safe to keep it the same and eventually deprecate the existing config. **Checklist** - [x] Documentation added - [x] Tests updated - [x] `CHANGELOG.md` updated (cherry picked from commit 1410808)
**What this PR does / why we need it**: I had enabled auto-merge in PR grafana#7804, but somehow it still merged the PR without all the checks passing. This PR fixes the failing lint and tests.
use grpc for communicating with compactor for query time filtering of data requested for deletion (#7804) Manual backport of #7804 and #7814 **What this PR does / why we need it**: Add grpc support to compactor for getting delete requests and gen number for query time filtering. Since these requests are internal to Loki, it would be good to use grpc instead of HTTP same as all the internal requests we do in Loki. I have added a new config for accepting the grpc address of the compactor. I tried having just the existing config and detecting if it is a grpc server, but it was hard to do it reliably, considering the different deployment modes we support. I think it is safe to keep it the same and eventually deprecate the existing config. **Checklist** - [x] Documentation added - [x] Tests updated - [x] `CHANGELOG.md` updated (cherry picked from commit 1410808) Co-authored-by: Sandeep Sukhani <sandeep.d.sukhani@gmail.com>
Problem: in grafana#7804 the possibility to use gRPC for communicating with compactor for query time filtering of data requested for deletion was added, however the loki mixin still generates the compactor service without a gRPC port. Solution: make the compactor service/deployment expose both a HTTP and gRPC port. Signed-off-by: JoaoBraveCoding <jmarcal@redhat.com>
**What this PR does / why we need it**: Problem: in #7804 the possibility to use gRPC for communicating with the compactor for query time filtering of data requested for deletion was added, however, the Loki mixin still generates the compactor service without a gRPC port. Solution: make the compactor service/deployment expose both an HTTP and gRPC port. Signed-off-by: JoaoBraveCoding <jmarcal@redhat.com>
What this PR does / why we need it:
Add grpc support to compactor for getting delete requests and gen number for query time filtering.
Since these requests are internal to Loki, it would be good to use grpc instead of HTTP same as all the internal requests we do in Loki.
I have added a new config for accepting the grpc address of the compactor. I tried having just the existing config and detecting if it is a grpc server, but it was hard to do it reliably, considering the different deployment modes we support. I think it is safe to keep it the same and eventually deprecate the existing config.
Checklist
CHANGELOG.md
updated