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

deprecate RawNode.TickQuiesced() #62

Merged
merged 1 commit into from
May 31, 2023

Conversation

erikgrinaker
Copy link
Contributor

@erikgrinaker erikgrinaker commented May 30, 2023

TickQuiesced() was originally added for use with range quiescence in CockroachDB, but hasn't been in use since 2018. This patch marks it as deprecated, to be removed in a future release.

See cockroachdb/cockroach#24956.

@erikgrinaker
Copy link
Contributor Author

cc @tbg @pavelkalinnikov

@pav-kv
Copy link
Contributor

pav-kv commented May 30, 2023

@erikgrinaker Please add a Signed-off-by footer: git commit --amend --signoff.

@tbg Please approve/merge, as I can't.

Copy link
Member

@spzala spzala left a comment

Choose a reason for hiding this comment

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

Approving workflow for build. How about if it's been used by someone in the past releases? It's a public func.

@spzala
Copy link
Member

spzala commented May 30, 2023

@erikgrinaker thanks, and please take care of the DCO.

Copy link
Member

@spzala spzala left a comment

Choose a reason for hiding this comment

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

cc @ahrtr

@tbg
Copy link
Collaborator

tbg commented May 30, 2023

This technically breaks drop-in backwards compatibility. I still think we should remove this, as it's quite crufty. I used Github code search and there are 200+ hits, but as far as I can tell they're all in

  • old forks of cockroach repos
  • forks of etcd/raft
  • some possibly machine-written versions of etcd/raft in, for example, D and Rust (exact matching comments).

Would appreciate some advice from the other maintainers. Personally, I think the benefit of removing this far outweigh the risks (in fact, I'd be concerned about someone using this).

cc @ahrtr @spzala

@spzala
Copy link
Member

spzala commented May 30, 2023

This technically breaks drop-in backwards compatibility. I still think we should remove this, as it's quite crufty. I used Github code search and there are 200+ hits, but as far as I can tell they're all in

* old forks of cockroach repos

* forks of etcd/raft

* some possibly machine-written versions of etcd/raft in, for example, D and Rust (exact matching comments).

Would appreciate some advice from the other maintainers. Personally, I think the benefit of removing this far outweigh the risks (in fact, I'd be concerned about someone using this).

cc @ahrtr @spzala

Thanks for the investigation @tbg I think we should at least mention this in the Changelog. This repo is still new so seems like we don't have the Changelog file created but it's time to do so now :) cc @ahrtr

@ahrtr
Copy link
Member

ahrtr commented May 30, 2023

If we decide to remove a public API, we need to add a breaking change notice at least. Creating a changelog (thx @spzala for the reminder) is a good idea.

I am also thinking to create a milestone as a goal to release next raft version, e.g. 3.6.0. Detailed proposals:

  • Add a milestone v3.6.0 now, and consider to formally release raft v3.6.0 when all of us feel comfortable (I imagine sometime in the following couple of months). We can mark any new non-trivial PRs included in the milestone, so that we can summarize the changelog when right before we plan to release v3.6.0.
  • Also add label backport/v3.5 and backport/3.4, and consider to backport any bug fix, which were added after separating the raft repo, to etcd/raft's release-3.5 and release-3.4 if needed.

@erikgrinaker
Copy link
Contributor Author

Thanks for the code search @tbg! I'd be surprised and concerned if someone was using this.

I don't know what our guarantees are around backwards compatibility, but it makes sense to leave this for either 3.6 or 4.0. This is not a priority at all, just an opportunistic cleanup. A milestone and changelog sounds good, let me know if we can help set that up.

please take care of the DCO

@ahrtr ahrtr added this to the v3.6.0 milestone May 31, 2023
@ahrtr
Copy link
Member

ahrtr commented May 31, 2023

Usually a best practice is to deprecate a public API firstly (e.g in 3.6) to discourage users from using it, and then remove it in a major release (e.g. 4.0). So two options:

  • Change this PR to deprecate the API instead of removing it. And add a comment mentioning we are planning to remove it in 4.0. (Personally preferred)
  • Remove it directly.

@erikgrinaker erikgrinaker changed the title remove RawNode.TickQuiesced() deprecate RawNode.TickQuiesced() May 31, 2023
@erikgrinaker
Copy link
Contributor Author

Sure, updated the PR to deprecate it and opened #66 to track the removal in the next major release.

`TickQuiesced()` was originally added for use with range quiescence in
CockroachDB, but hasn't been in use since 2018. This patch marks it as
deprecated, to be removed in a future release.

Signed-off-by: Erik Grinaker <grinaker@cockroachlabs.com>
Copy link
Member

@ahrtr ahrtr 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 @erikgrinaker

Copy link
Member

@spzala spzala 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 @erikgrinaker

@spzala spzala merged commit e293cfa into etcd-io:main May 31, 2023
7 checks passed
@erikgrinaker
Copy link
Contributor Author

erikgrinaker commented May 31, 2023

TFTRs! Maybe we should add a 4.0 milestone too, and track #66 in it?

@ahrtr
Copy link
Member

ahrtr commented May 31, 2023

TFTRs! Maybe we should add a 4.0 milestone too, and track #66 in it?

Done.

nvanbenschoten added a commit to nvanbenschoten/cockroach that referenced this pull request May 21, 2024
This commit removes the `(*RawNode).TickQuiesced` method. The method was
deprecated back in etcd-io/raft#62 and has not
been in use since 2018.

Epic: None
Release note: None
craig bot pushed a commit to cockroachdb/cockroach that referenced this pull request May 21, 2024
123120: ui: Highlight unavailable ranges in red on the summary bar with nonzero r=abarganier a=theloneexplorerquest

Modify the summary bar to change the color of unavailable ranges. When the unavailable range is greater than zero, it will be displayed in red; if it is zero, it will be green.

Fix: #122014

Release note (ui): Changed the color of unavailable ranges on the summary bar to red when nonzero; ranges are green when zero.

124301: logtestutils: generalize structured logging spy r=xinhaoz a=xinhaoz

This commit generalizes the structured logging spy previously being used for datadriven telemetry tests so that it can repurposed for other structured logging channels.

Epic: none

Release note: None

124403: roachtest: use first transient error when checking for flakes r=srosenberg a=renatolabs

Previously, roachtest would only look at the outermost error in a chain that matched a `TransientError` (or `ErrorWithOwnership`) when checking for flakes. However, that is in most cases *not* what we want: if a transient error wraps another transient error, the actual reason for the failure is the original (wrapped) error.

Informs: #123887

Release note: None

124425: pkg/server/structlogging: support hot ranges stats with diagnostic reporting disabled r=kyle-a-wong a=kyle-a-wong

Previously, enable hot ranges stats also required the enabling of diagnostic reporting. Hot ranges stats doesn't need to be dependent on diagnostic reporting and someone might want to enable hot ranges stats without enabling diagnostic reporting.

Now, server.telemetry.hot_ranges_stats.enabled can be set to true while without setting diagnostics.reporting.enabled

Epic: none
Fixes: #122977
Part of: https://cockroachlabs.atlassian.net/browse/CRDB-38152

Release note: None

124459: builtins: fix st_geojson when max_decimal_digits is specified r=yuzefovich a=yuzefovich

This commit fixes a regression in `st_geojson` builtin when `max_decimal_digits` argument is specified which was introduced in 6009141 (during 24.1 cycle). In particular, this overload specifies the precision (rather than using the default number of digits), and that commit made it so that we ignore the precision argument. This is now fixed.

Fixes: #124368.

Release note (bug fix): CockroachDB previously would ignore `max_decimal_digits` argument of `st_geojson` builtin function and would use the default instead. The bug is only present in 24.1.0 releases.

124491: raft: remove RawNode.TickQuiesced r=pav-kv a=nvanbenschoten

This commit removes the `(*RawNode).TickQuiesced` method. The method was deprecated back in etcd-io/raft#62 and has not been in use since 2018.

Epic: None
Release note: None

Co-authored-by: theloneexplorerquest <theloneexplorerquest@gmail.com>
Co-authored-by: Xin Hao Zhang <xzhang@cockroachlabs.com>
Co-authored-by: Renato Costa <renato@cockroachlabs.com>
Co-authored-by: Kyle Wong <kyle.wong@cockroachlabs.com>
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
craig bot pushed a commit to cockroachdb/cockroach that referenced this pull request May 21, 2024
119416: pkg/util/eventagg: general aggregation framework for reduction of event cardinality r=dhartunian a=abarganier

**Reviewer note: review commit-wise**

The eventagg package is (currently) a proof of concept ("POC") that aims to provide an easy-to-use library that standardizes the way in which we aggregate Observability event data in CRDB. The goal is to eventually emit that data as "exhaust" from CRDB, which downstream systems can consume to build Observability features that do not rely on CRDB's own availability to aid in debugging & investigations. Additionally, we want to provide facilities for code within CRDB to consume this same data, such that it can also power features internally.

This pull request contains work to create the aggregation mechanism in `pkg/util/eventagg`.

This facilities provide a way of aggregating notable events to reduce cardinality, before performing further processing and/or structured logging.

In addition to the framework, a toy SQL Stats example is provided in `pkg/sql/sqlstats/aggregate.go`, which shows the current developer experience when using the APIs.

See `pkg/util/eventagg/doc.go` for more details

Since this feature is currently experimental, it's gated by the `COCKROACH_ENABLE_STRUCTURED_EVENTS` environment variable, which is disabled by default.

---

Release note: none

Epic: CRDB-35919

123120: ui: Highlight unavailable ranges in red on the summary bar with nonzero r=abarganier a=theloneexplorerquest

Modify the summary bar to change the color of unavailable ranges. When the unavailable range is greater than zero, it will be displayed in red; if it is zero, it will be green.

Fix: #122014

Release note (ui): Changed the color of unavailable ranges on the summary bar to red when nonzero; ranges are green when zero.

124160: roachtest: add test for admission control disk bandwidth  r=sumeerbhola a=aadityasondhi

This test runs a single node target cluster that has two workloads
running on it. The lower priority (qos=background) is very bandwidth
intensive, and without the AC bandwidth limiter would saturate the
provisioned bandwidth (controlled using cgroups).

This test shows how setting the cluster setting
`kvadmission.store.provisioned-bandwidth` limits the disk bandwidth
usage of lower priority work and shapes it at the value set in the
setting.

Fixes #121576.

Release note: None


124293: tools: switch md5 cmd name based on existence  r=dt a=dt

Release note: none.
Epic: none.

124348: backupccl: download pre restore data in cluster restore r=dt a=msbutler

This patch adds the pre restore data spans to the list of spans to download.
While these pre restore spans map to data in the temporary system table
database that are then rewwritten to the actual system table, the download job
ought to download all external data linked into the cluster out of principle.

Fixes #124330

Release note: none

124403: roachtest: use first transient error when checking for flakes r=srosenberg a=renatolabs

Previously, roachtest would only look at the outermost error in a chain that matched a `TransientError` (or `ErrorWithOwnership`) when checking for flakes. However, that is in most cases *not* what we want: if a transient error wraps another transient error, the actual reason for the failure is the original (wrapped) error.

Informs: #123887

Release note: None

124486: kvclient: add WithFiltering option to rangefeed client r=nvanbenschoten,msbutler a=stevendanna

This adds a WithFiltering option to the rangefeed client that passes through the option to the underlying rangefeed.

Epic: none
Release note: None

124491: raft: remove RawNode.TickQuiesced r=pav-kv a=nvanbenschoten

This commit removes the `(*RawNode).TickQuiesced` method. The method was deprecated back in etcd-io/raft#62 and has not been in use since 2018.

Epic: None
Release note: None

Co-authored-by: Alex Barganier <abarganier@cockroachlabs.com>
Co-authored-by: theloneexplorerquest <theloneexplorerquest@gmail.com>
Co-authored-by: Aaditya Sondhi <20070511+aadityasondhi@users.noreply.github.com>
Co-authored-by: David Taylor <tinystatemachine@gmail.com>
Co-authored-by: Michael Butler <butler@cockroachlabs.com>
Co-authored-by: Renato Costa <renato@cockroachlabs.com>
Co-authored-by: Steven Danna <danna@cockroachlabs.com>
Co-authored-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
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.

None yet

5 participants