vtexplain: Ensure memory topo is set up for throttler#15279
vtexplain: Ensure memory topo is set up for throttler#15279dbussink merged 1 commit intovitessio:mainfrom
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
go/vt/vtexplain/vtexplain_vtgate.go
Outdated
There was a problem hiding this comment.
@shlomi-noach In order to not have the throttler log errors inside vtexplain, I had to set up the above minimum stuff in the memory topo for SrvKeyspace.
I wonder if there's a better way for this and if this could be refactored in a better way? Should we have some option to disable more parts of the throttler when we're inside vtexplain?
I guess alternatively, we could make the throttler a parameter in NewTabletServer instead to inject it (which is called inside vtexplain), so we could inject a no-op throttler? Any other ideas?
There was a problem hiding this comment.
@dbussink could you please clarify what errors did the throttler log inside vtexplain?
047c167 to
e35d1a7
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #15279 +/- ##
==========================================
+ Coverage 67.41% 67.48% +0.06%
==========================================
Files 1560 1561 +1
Lines 192752 193330 +578
==========================================
+ Hits 129952 130469 +517
- Misses 62800 62861 +61 ☔ View full report in Codecov by Sentry. |
e35d1a7 to
116a27e
Compare
shlomi-noach
left a comment
There was a problem hiding this comment.
Other than the obvious change in throttler.go where we do not log interrupted/cancelled errors, I'm not sure I follow the intent of this PR and what issues are there with the throttler using memorytopo.
go/vt/vtexplain/vtexplain_vtgate.go
Outdated
There was a problem hiding this comment.
@dbussink could you please clarify what errors did the throttler log inside vtexplain?
shlomi-noach
left a comment
There was a problem hiding this comment.
For now, this is a good workaround. We need to review how we run tabletserver within the context of vtexplain. We are not interested in the throttler at all running in such context, and possibly other components (heartbeat writer, etc.). We'll take that into a separate discussion/change.
|
To be backported to all supported versions as the throttler will produce the same kind of logging on all versions since |
116a27e to
bd20ce3
Compare
go/vt/srvtopo/watch_srvkeyspace.go
Outdated
There was a problem hiding this comment.
This was incorrectly using context.Background(). I also audited the paths into this function and from things like the CLI invocation, we do pass in the background context correctly.
See also watch_srvvschema where we do have the logic correct.
|
No more stray logging after this change (together with #15275). BeforeAfterNo more noise and also a lot faster test runtime. |
This logic ensures the memorytopo is set up for the throttler logic so that it doesn't log any errors. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
bd20ce3 to
42e2746
Compare
Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
This logic ensures the memorytopo is set up for the throttler logic so that it doesn't log any errors.
Needs to be backported to all supported versions, since the throttler is part of all of those.
Related Issue(s)
Part of #15242
Checklist