Skip to content

Conversation

@blathers-crl
Copy link

@blathers-crl blathers-crl bot commented Nov 23, 2023

Backport 1/1 commits from #114365 on behalf of @kvoli.

/cc @cockroachdb/release


It was possible for a replica to be stuck processing in a queue's
replica set. This could occur when a replica had recently been removed
from purgatory for processing but was destroyed, or replica ID changed
before being processed.

When this occurred, the replica could never be processed by the queue
again, potentially leading to decommission stalls, constraint violations
or under(over)replication.

Remove the replica from the queue set upon encountering a replica which
was destroyed, or replica ID changed when processing purgatory. This
prevents the replica from becoming stuck in a processing state in the
queue set.

Fixes: #112761
Fixes: #110761

Release note (bug fix): The store queues will no longer leave purgatory
replicas which have changed replica IDs, or have been destroyed stuck
unable to process via the respective queue again if re-added.


Release justification: Fixes serious bug.

It was possible for a replica to be stuck processing in a queue's
replica set. This could occur when a replica had recently been removed
from purgatory for processing but was destroyed, or replica ID changed
before being processed.

When this occurred, the replica could never be processed by the queue
again, potentially leading to decommission stalls, constraint violations
or under(over)replication.

Remove the replica from the queue set upon encountering a replica which
was destroyed, or replica ID changed when processing purgatory. This
prevents the replica from becoming stuck in a processing state in the
queue set.

Fixes: #112761
Fixes: #110761

Release note (bug fix): The store queues will no longer leave purgatory
replicas which have changed replica IDs, or have been destroyed stuck
unable to process via the respective queue again if re-added.
@blathers-crl blathers-crl bot requested a review from a team as a code owner November 23, 2023 14:39
@blathers-crl blathers-crl bot force-pushed the blathers/backport-release-22.2-114365 branch from ecba743 to a027072 Compare November 23, 2023 14:39
@blathers-crl blathers-crl bot added blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot. labels Nov 23, 2023
@blathers-crl blathers-crl bot force-pushed the blathers/backport-release-22.2-114365 branch from 5801b62 to 79ac785 Compare November 23, 2023 14:39
@blathers-crl
Copy link
Author

blathers-crl bot commented Nov 23, 2023

Thanks for opening a backport.

Please check the backport criteria before merging:

  • Backports should only be created for serious
    issues
    or test-only changes.
  • Backports should not break backwards-compatibility.
  • Backports should change as little code as possible.
  • Backports should not change on-disk formats or node communication protocols.
  • Backports should not add new functionality (except as defined
    here).
  • Backports must not add, edit, or otherwise modify cluster versions; or add version gates.
  • All backports must be reviewed by the owning areas TL and one additional
    TL. For more information as to how that review should be conducted, please consult the backport
    policy
    .
If your backport adds new functionality, please ensure that the following additional criteria are satisfied:
  • There is a high priority need for the functionality that cannot wait until the next release and is difficult to address in another way.
  • The new functionality is additive-only and only runs for clusters which have specifically “opted in” to it (e.g. by a cluster setting).
  • New code is protected by a conditional check that is trivial to verify and ensures that it only runs for opt-in clusters. State changes must be further protected such that nodes running old binaries will not be negatively impacted by the new state (with a mixed version test added).
  • The PM and TL on the team that owns the changed code have signed off that the change obeys the above rules.
  • Your backport must be accompanied by a post to the appropriate Slack
    channel (#db-backports-point-releases or #db-backports-XX-X-release) for awareness and discussion.

Also, please add a brief release justification to the body of your PR to justify this
backport.

@blathers-crl blathers-crl bot added the backport Label PR's that are backports to older release branches label Nov 23, 2023
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link

@andrewbaptist andrewbaptist left a comment

Choose a reason for hiding this comment

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

:lgtm:

Changes look good, but I'm not sure that we should backport this far back. I'll let @nvanbenschoten comment.

@kvoli
Copy link
Contributor

kvoli commented Nov 28, 2023

Changes look good, but I'm not sure that we should backport this far back. I'll let @nvanbenschoten comment.

The bug has been around since at least 20.x. It is serious and hard enough to diagnose that it seems worthwhile going back as far as supported.

@kvoli
Copy link
Contributor

kvoli commented Dec 6, 2023

TYFTRs!

@kvoli kvoli merged commit 7a2b1c4 into release-22.2 Dec 6, 2023
@kvoli kvoli deleted the blathers/backport-release-22.2-114365 branch December 6, 2023 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Label PR's that are backports to older release branches blathers-backport This is a backport that Blathers created automatically. O-robot Originated from a bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants