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

rangefeed: remove non-muxrangefeed code #125610

Merged
merged 1 commit into from
Jun 18, 2024
Merged

Conversation

wenyihu6
Copy link
Contributor

@wenyihu6 wenyihu6 commented Jun 13, 2024

In 22.2, mux rangefeeds were introduced to reduce the number of rpc streams from
one per replica to one per client for all rangefeeds on a node.

In 24.1, to simplify the implementation of #110432, we removed any cluster
setting for enabling non-mux rangefeeds, making them always enabled. But we
retained the non-mux rangefeed code there for test coverage in mixed-version
clusters. Given that we are going to 24.2, we are now more comfortable with removing
the tests. This patch completely removes client and server code for non-mux
rangefeed.

Resolves: #125666
Release note: none

Copy link

blathers-crl bot commented Jun 13, 2024

Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@wenyihu6 wenyihu6 force-pushed the removenonmux branch 12 times, most recently from 9eeb56f to db3d932 Compare June 14, 2024 00:39
@wenyihu6
Copy link
Contributor Author

The first three commits are from #125665.

@wenyihu6
Copy link
Contributor Author

wenyihu6 commented Jun 14, 2024

Correct me if I'm wrong - we shouldn't need to worry about mixed version tests here since they were covered during the removal process in v24.1

func (cmvt *cdcMixedVersionTester) muxRangeFeedSupported(
h *mixedversion.Helper,
) (bool, option.NodeListOption, error) {
// changefeed.mux_rangefeed.enabled was added in 22.2 and deleted in 24.1.
return canMixedVersionUseDeletedClusterSetting(h,
false, /* isSystem */
clusterupgrade.MustParseVersion("v22.2.0"),
clusterupgrade.MustParseVersion("v24.1.0-alpha.00000000"),
)
}
.

@wenyihu6 wenyihu6 marked this pull request as ready for review June 14, 2024 01:27
@wenyihu6 wenyihu6 requested review from a team as code owners June 14, 2024 01:27
@wenyihu6 wenyihu6 requested a review from a team June 14, 2024 01:27
@wenyihu6 wenyihu6 requested review from a team as code owners June 14, 2024 01:27
@wenyihu6 wenyihu6 requested review from srosenberg and DarrylWong and removed request for a team June 14, 2024 01:27
@wenyihu6 wenyihu6 requested review from dt, nvanbenschoten, a team, srosenberg and renatolabs and removed request for a team, srosenberg, DarrylWong and renatolabs June 14, 2024 01:27
@wenyihu6 wenyihu6 force-pushed the removenonmux branch 3 times, most recently from 66bbd9e to 9bbe559 Compare June 14, 2024 17:14
In 22.2, mux rangefeeds were introduced to reduce the number of rpc streams from
one per replica to one per client for all rangefeeds on a node.

In 24.1, to simplify the implementation of cockroachdb#110432, we removed any cluster
setting for enabling non-mux rangefeeds, making them always enabled. But we
retained the non-mux rangefeed code there for test coverage in mixed-version
clusters. Given that we are going to 24.2, we are now more comfortable with removing
the tests. This patch completely removes client and server code for non-mux
rangefeed.

Resolves: cockroachdb#125666
Release note: none
@wenyihu6
Copy link
Contributor Author

wenyihu6 commented Jun 14, 2024

@nvanbenschoten (Didn't mean to rush the review) Friendly ping here to ensure this PR isn’t overlooked since it was out of order from the list of PRs I made.

@wenyihu6 wenyihu6 requested review from nvanbenschoten and removed request for nvanbenschoten June 14, 2024 21:00
@wenyihu6
Copy link
Contributor Author

Friendly ping here : ) Lmk if we prefer to bake for a while before merging this pr.

Copy link
Member

@nvanbenschoten nvanbenschoten left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 17 of 17 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @dt)

@wenyihu6
Copy link
Contributor Author

TFTR!

bors r=nvanbenschoten

@craig craig bot merged commit 8b17f49 into cockroachdb:master Jun 18, 2024
22 checks passed
wenyihu6 added a commit to wenyihu6/cockroach that referenced this pull request Jul 1, 2024
Previously, we removed non-mux rangefeed code in
cockroachdb#125610. However, that patch forgot
to remove non-mux rangefeed metrics. This patch removes these metrics as they
are no longer needed.

Epic: none
Release note: none
wenyihu6 added a commit to wenyihu6/cockroach that referenced this pull request Jul 2, 2024
Previously, we removed non-mux rangefeed code in
cockroachdb#125610. However, that patch forgot
to remove non-mux rangefeed metrics. This patch removes these metrics as they
are no longer needed.

Epic: none
Release note: none
wenyihu6 added a commit to wenyihu6/cockroach that referenced this pull request Jul 2, 2024
Previously, we removed non-mux rangefeed code in
cockroachdb#125610. However, that patch forgot
to remove non-mux rangefeed metrics. This patch removes these metrics as they
are no longer needed.

Epic: none
Release note: none
craig bot pushed a commit that referenced this pull request Jul 2, 2024
126352: cli: add fallback query support for debug zip r=xinhaoz a=dhartunian

Previously, when SQL queries for dumping tables to debug zip would fail, we would have no follow-up. Engineers can now define "fallback" queries for tables in debug zip in order to make a second attempt with a simpler query. Often we want to run a more complex query to gather more debug data but these queries can fail when the cluster is experiencing problems. This change gives us a chance to define a simpler approach that can be attempted when necessary.

In order to define a fallback, there are two new optional fields in the `TableRegistryConfig` struct for redacted and unredacted queries respectively.

Debug zip output will still include the failed attempts at the original query along with the error message file as before. If a fallback query is defined, that query will produce its own output (and error) file with an additional `.fallback` suffix added to the base table name to identify it.

Resolves: #123964
Epic: CRDB-35278

Release note: None

126354: ui: alter role events render correctly r=xinhaoz a=dhartunian

Previously, ALTER ROLE events without role options would render with an "undefined" option in the event log on the DB Console. This change amends the rendering logic to correctly render events without any options.

Resolves #124871
Epic: None

Release note (bug fix,ui change): ALTER ROLE events in the DB Console event log now render correctly when the event does not contain any role options.

126486: kvserver/rangefeed: remove lockedRangefeedStream r=nvanbenschoten a=wenyihu6

**kvserver: wrap kvpb.RangeFeedEventSink in Stream**

Previously, we declared the same interface signature twice: once in
kvpb.RangeFeedEventSink and again in rangefeed.Stream. This patch embeds
kvpb.RangeFeedEventSink inside rangefeed.Stream, making rangefeed.Stream a
superset of kvpb.RangeFeedEventSink. This approach makes sense, as each
rangefeed server stream should be a rangefeed event sink, capable of making
thread-safe rangefeed event sends.

Epic: none
Release note: none

---

**kvserver/rangefeed: remove lockedRangefeedStream**

Previously, we created separate locked rangefeed streams for each individual
rangefeed stream to ensure Send can be called concurrently as the underlying
grpc stream is not thread safe. However, since the introduction of the mux
rangefeed support, we already have a dedicated lock for the underlying mux
stream, making the Send method on each rangefeed stream thread safe already.
This patch removes the redundant locks from each individual rangefeed stream.

Epic: none
Release note: none

126487: kvserver/rangefeed: remove non-mux rangefeed metrics r=nvanbenschoten a=wenyihu6

Previously, we removed non-mux rangefeed code in
#125610. However, that patch forgot
to remove non-mux rangefeed metrics. This patch removes these metrics as they
are no longer needed.

Epic: none
Release note: none

126498: status: fix TestTenantStatusAPI test r=xinhaoz a=dhartunian

Previously, this test would use a single connection, cancel it, and then use the connection to verify the cancellation.

The test is adjusted here to use two separate sessions, one to cancel for testing, and another to observe the cancellation.

Resolves: #125404
Epic: None

Release note: None

126524: sql: unskip Insights test r=dhartunian a=dhartunian

This test has been flaky for a while because of the async tagging of the TransactionID to the insight that somtimes takes too long to complete. This change removes that check and unskips the test so that we can catch regressions for this feature. In the future we may want to write a separate test to verify the async transactionID tagging separately.

Resolves: #125771
Resolves: #121986

Epic: None
Release note: None

126533: kv: hook Raft StoreLiveness into storeliveness package r=nvanbenschoten a=nvanbenschoten

Fixes #125242.

This commit adds a `replicaRLockedStoreLiveness` adapter type to hook the raft store liveness into the storeliveness package.

This is currently unused.

Release note: None

126536: roachpb: add Leader lease type definition r=nvanbenschoten a=nvanbenschoten

Fixes #125225.

This commit adds a new `Term` field to the Lease struct. This field defines the term of the raft leader that a leader lease is associated with. The lease is valid for as long as the raft leader has a guarantee from store liveness that it remains the leader under this term. The lease is invalid if the raft leader loses leadership (i.e. changes its term).

The field is not yet used.

Release note: None

Co-authored-by: David Hartunian <[email protected]>
Co-authored-by: Wenyi Hu <[email protected]>
Co-authored-by: Nathan VanBenschoten <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rangefeed: remove non-mux rangefeed code entirely
3 participants