Skip to content

Conversation

@markuspf
Copy link
Contributor

@markuspf markuspf commented Dec 8, 2025

Scope & Purpose

Removes some code duplication. Requires #22165 to be merged first, and has an enterprise counterpart, https://github.com/arangodb/enterprise/pull/1564


Note

Replaces per-step collection-name extraction with VertexRef::collectionName, updates PathValidator accordingly, removes redundant getCollectionName/extract helpers, and wires new VertexRef.cpp into build.

  • Graph Types:
    • Add VertexRef::collectionName() and new implementation file Graph/Types/VertexRef.cpp; include in Graph/Types/CMakeLists.txt.
  • Path Validation:
    • Use step.getVertex().collectionName() in PathValidator::evaluateVertexRestriction with error propagation.
  • Provider Steps:
    • Remove getCollectionName() and BaseStep::extractCollectionName; adjust ClusterProviderStep, SingleServerProviderStep, and test MockGraphProvider::Step to rely on VertexRef APIs.
  • Enumerator:
    • Minor formatting/visibility tweaks in WeightedTwoSidedEnumerator (setForbidden* signatures, searchDone declaration).

Written by Cursor Bugbot for commit 5abb820. This will update automatically on new commits. Configure here.

@cla-bot cla-bot bot added the cla-signed label Dec 8, 2025
@markuspf markuspf changed the title Remove extractCollection helper from step [COR] Remove extractCollection helper from step Dec 8, 2025
Copy link
Contributor

@jvolmer jvolmer left a comment

Choose a reason for hiding this comment

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

LGTM, just a nitpicking

Comment on lines 29 to 34
[[nodiscard]] auto extractCollectionName(
velocypack::HashedStringRef const& idHashed)
-> ResultT<std::pair<std::string, size_t>>;

[[nodiscard]] auto extractCollectionNameOrThrow(
velocypack::HashedStringRef const& vertexRef) -> std::string;
Copy link
Contributor

Choose a reason for hiding this comment

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

probably personal taste: could also be member functions of VertexRef but his is also fine.

@markuspf markuspf force-pushed the chore/unify-vertex-ref branch from 94c2ae2 to 4e40c07 Compare December 9, 2025 19:32
@markuspf markuspf force-pushed the chore/remove-extract-collection-helper-from-step branch from e36b2c6 to ae01274 Compare December 9, 2025 19:37
@markuspf markuspf force-pushed the chore/remove-extract-collection-helper-from-step branch from a42946e to 65b6bad Compare December 9, 2025 20:10
@markuspf markuspf changed the title [COR] Remove extractCollection helper from step [COR-57] Remove extractCollection helper from step Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants