Skip to content

storage: remove error from Replica.applyTimestampCache() #41308

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

Merged
merged 1 commit into from
Oct 4, 2019

Conversation

ajwerner
Copy link
Contributor

@ajwerner ajwerner commented Oct 3, 2019

Stumbled upon a function with an error in its return signature
that never returns an error. Better to remove it and the stale
comment that goes with it. The removal of the code paths which
could have returned an error occurred in #33396.

Release justification: Low risk, does not change logic. Could also
hold off.

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@ajwerner
Copy link
Contributor Author

ajwerner commented Oct 4, 2019

Logic test flake.

bors r+

@craig
Copy link
Contributor

craig bot commented Oct 4, 2019

Merge conflict

@ajwerner ajwerner force-pushed the ajwerner/remove-dead-code branch from bb7130f to dbff102 Compare October 4, 2019 13:56
@ajwerner
Copy link
Contributor Author

ajwerner commented Oct 4, 2019

rebased

bors r+

@craig
Copy link
Contributor

craig bot commented Oct 4, 2019

Build failed

Stumbled upon a function with an error in its return signature
that never returns an error. Better to remove it and the stale
comment that goes with it. The removal of the code paths which
could have returned an error occurred in cockroachdb#33396.

Release justification: Low risk, does not change logic. Could also
hold off.

Release note: None
@ajwerner ajwerner force-pushed the ajwerner/remove-dead-code branch from dbff102 to 2c0e2ab Compare October 4, 2019 14:59
@ajwerner
Copy link
Contributor Author

ajwerner commented Oct 4, 2019

bors r+

craig bot pushed a commit that referenced this pull request Oct 4, 2019
41300: storage: more aggressively replica GC learner replicas r=ajwerner a=ajwerner

This PR fixes a test flake in TestSystemZoneConfig:

```
    client_replica_test.go:1753: condition failed to evaluate within 45s: mismatch between
        r1:/{Min-System/NodeLiveness} [(n1,s1):1, (n6,s6):2, (n4,s4):3, (n2,s2):7, (n7,s7):5, next=8, gen=14]
        r1:/{Min-System/NodeLiveness} [(n1,s1):1, (n6,s6):2, (n4,s4):3, (n2,s2):4, (n7,s7):5, (n3,s3):6LEARNER, next=7, gen=9]
```

The above flake happens because we set the expectation in the map to a
descriptor which contains a learner which has since been removed.

We shouldn't use a range descriptor which contains learners as the expectation.
To avoid that we return an error in the succeeds soon if we come across a
descriptor which contains learners. This behavior unvealed another issue,
we are way too conservative with replica GC for learners. Most of the time
when learners are removed they hear about their own removal, but if they don't
we won't consider the Replica for removal for 10 days! This commit changes
the replica gc queue behavior to treat learners line candidates.

Fixes #40980.

Release Justification: bug fixes and low-risk updates to new functionality.

Release note: None

41308: storage: remove error from Replica.applyTimestampCache() r=ajwerner a=ajwerner

Stumbled upon a function with an error in its return signature
that never returns an error. Better to remove it and the stale
comment that goes with it. The removal of the code paths which
could have returned an error occurred in #33396.

Release justification: Low risk, does not change logic. Could also
hold off.

Release note: None

Co-authored-by: Andrew Werner <[email protected]>
@craig
Copy link
Contributor

craig bot commented Oct 4, 2019

Build succeeded

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.

3 participants