Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
differentiate between forward and backward read stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Liang committed Jan 19, 2012
1 parent 8730216 commit 7396220
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -51,11 +51,14 @@ class SelectCompiler(forwardingManager: ForwardingManager, intersectionConfig: c
if (items != 1) throw new InvalidQueryException("Left " + items + " items on the stack instaed of 1")

var stack = new mutable.Stack[QueryTree]
val graphIds = new mutable.HashSet[Int]
val graphIds = new mutable.HashSet[String]
for (op <- program) op.operationType match {
case SelectOperationType.SimpleQuery =>
val term = op.term.get
graphIds += term.graphId

// denote n for a backwards query
graphIds += (if (term.isForward) "" else "n") + term.graphId

val shard = forwardingManager.find(term.sourceId, term.graphId, Direction(term.isForward))
val states = if (term.states.isEmpty) List(State.Normal) else term.states
val query = if (term.destinationIds.isDefined) {
Expand Down

0 comments on commit 7396220

Please sign in to comment.