Page MenuHomeSoftware Heritage

Add low level API (WIP)
ClosedPublic

Authored by seirl on Oct 2 2019, 7:34 PM.

Diff Detail

Repository
rDGRPH Compressed graph representation
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 8094
Build 11670: tox-on-jenkinsJenkins
Build 11669: arc lint + arc unit

Event Timeline

  • rebase
  • graph.py: add 'deep' methods

Refactor simple_traversal

This revision was not accepted when it landed; it landed in state Needs Review.Oct 4 2019, 6:25 PM
This revision was automatically updated to reflect the committed changes.
  • backend: propagate java errors to the toplevel
zack requested changes to this revision.Oct 6 2019, 11:41 AM
zack added a subscriber: zack.
zack added inline comments.
swh/graph/graph.py
12–19

this looks graphviz-specific, so it should go in swh.graph.dot instead

45

It's not clear to me why the first argument is called "parent_graph" (here, and everywhere in the module). Isn't it just the graph the various visitors are working on?

swh/graph/server/backend.py
121

why the explicit timeout here?
can't this fail for the wrong reason, e.g., when calling the leaves method on large graphs?

This revision now requires changes to proceed.Oct 6 2019, 11:41 AM

btw, I've tested this diff manually in tox and it does build fine

swh/graph/server/backend.py
121

I'm gonna add a comment for the timeout.

No, this is only for opening the FIFO, not reading it, so it can't fail like that. The FIFO is opened on both sides at the beginning.

The problem is, if there is an exception in the java call thread and the FIFO is never created, this thread will block endlessly without timeout, because the FIFO has to be opened from both sides for the open(2) call to return. Adding a timeout for this open() call allows Java exceptions that happen between the Java call and the open() on the Java side to be propagated to the main thread.

  • rebase
  • graph: cosmetic fixes and comments
This revision is now accepted and ready to land.Oct 7 2019, 8:25 PM