Skip to content

Please consider adding an isAnyReachable method to ReachabilityChecker #204

@EdwinKempin

Description

@EdwinKempin

Description

In Gerrit we have a few places where we iterate over a set of commits to see if any of them is reachable from a start commit (e.g. [1,2]). It would be nice if ReachabilityChecker could offer a isAnyReachable method for this, so that we can make a single call to ReachabilityChecker, instead of calling areAllReachable multiple times.

For reference, see the discussion at [3].

[1] https://gerrit-review.git.corp.google.com/c/gerrit/+/501982

[2] https://gerrit-review.git.corp.google.com/c/gerrit/+/502022

[3] https://gerrit-review.git.corp.google.com/c/gerrit/+/501982/2/java/com/google/gerrit/server/git/receive/ReceiveCommits.java#3458

Motivation

We hope that having an isAnyReachable method in ReachabilityChecker could provide better performance than calling areAllReachable multiple times. This would help us (Gerrit team) improve the performance of git pushes to Gerrit.

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions