server: rationalize tenant TestServers metrics registration#97884
Merged
craig[bot] merged 2 commits intocockroachdb:masterfrom Mar 2, 2023
Merged
server: rationalize tenant TestServers metrics registration#97884craig[bot] merged 2 commits intocockroachdb:masterfrom
craig[bot] merged 2 commits intocockroachdb:masterfrom
Conversation
This patch makes tenant test servers started with StartTenant (as opposed to StartSharedProcessTenant) not register their metrics in the parent TestServer's MetricRecorder. I believe the fact that they were previously registering themselves to have been a mistake. To better simulate out-of-process tenants, we should not have references like this from a TestServer to the "out-of-process" tenants. StartSharedProcessTenants tenants continue to be registered with the parent Server. Background: when a tenant registers with a parent recorder, the tenant's metrics are reported on _status/vars. Note that these tenant metrics are not currently written to TSDB, although work on that is happening elsewhere. I believe the only practical thing that this patch affects is `cockroach demo --multitenant=true --disable-server-controller=true` (which is not the default). Before, regardless of `--disable-server-controller`, the tenant's metrics were reported on the system's status/vars. Now, they're no longer reported there with `--disable-server-controller=true` - which I believe is a good thing because it more accurately represents reality with out-of-process tenants (I don't know if --disable-server-controller=true deserves to exist at all, btw). Release note: None
Release note: None
Member
dhartunian
approved these changes
Mar 2, 2023
Collaborator
dhartunian
left a comment
There was a problem hiding this comment.
agree this was a mistake. thx for fixing.
Reviewed 3 of 3 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status:complete! 1 of 0 LGTMs obtained (waiting on @aadityasondhi and @abarganier)
Contributor
Author
|
bors r+ |
Contributor
|
Build succeeded: |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch makes tenant test servers started with StartTenant (as
opposed to StartSharedProcessTenant) not register their metrics in the
parent TestServer's MetricRecorder. I believe the fact that they were
previously registering themselves to have been a mistake. To better
simulate out-of-process tenants, we should not have references like this
from a TestServer to the "out-of-process" tenants.
StartSharedProcessTenants tenants continue to be registered with the
parent Server.
Background: when a tenant registers with a parent recorder, the tenant's
metrics are reported on _status/vars. Note that these tenant metrics are
not currently written to TSDB, although work on that is happening
elsewhere.
I believe the only practical thing that this patch affects is
cockroach demo --multitenant=true --disable-server-controller=true(which is not the default). Before, regardless of
--disable-server-controller, the tenant's metrics were reported on thesystem's status/vars. Now, they're no longer reported there with
--disable-server-controller=true- which I believe is a goodthing because it more accurately represents reality with out-of-process
tenants (I don't know if --disable-server-controller=true deserves to
exist at all, btw).
Release note: None
Epic: None