Skip to content

Commit

Permalink
add a comment on subgraph id generation (#2711)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenoir authored Sep 17, 2024
1 parent 9703e0c commit 80a4d27
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,23 @@ private class WorkSubgraph(
//
// Here there are two components: (A B C F G) and (D E H)
//
// This subgraphId contains all the works in an update, regardless of
// whether they're in the same component. Even when graphs are split into
// multiple components, they all share the same subgraph ID. This is to
// allow graphs to be reconnected by preserving edge relationships that
// span components.
//
// e.g.
// A->B->C->D->E
//
// If we update work C, the graph will be split into two components:
//
// A->B->C
// D->E
//
// The subgraphId for both components will be the same, so that when we
// recombine the graph, we can still match across the C->D edge.

val subgraphId = SubgraphId(workIds)

g.componentTraverser()
Expand Down

0 comments on commit 80a4d27

Please sign in to comment.