diff --git a/arangod/Aql/ShortestPathBlock.cpp b/arangod/Aql/ShortestPathBlock.cpp index f8f57a6350..d866c2f061 100644 --- a/arangod/Aql/ShortestPathBlock.cpp +++ b/arangod/Aql/ShortestPathBlock.cpp @@ -31,8 +31,6 @@ #include "Graph/ConstantWeightShortestPathFinder.h" #include "Graph/ShortestPathFinder.h" #include "Graph/ShortestPathResult.h" -#include "Graph/AttributeWeightShortestPathFinder.h" -#include "Graph/ConstantWeightShortestPathFinder.h" #include "Transaction/Methods.h" #include "Utils/OperationCursor.h" #include "VocBase/LogicalCollection.h" diff --git a/js/common/modules/@arangodb/aql/explainer.js b/js/common/modules/@arangodb/aql/explainer.js index cd5333ee77..adfdd2850e 100644 --- a/js/common/modules/@arangodb/aql/explainer.js +++ b/js/common/modules/@arangodb/aql/explainer.js @@ -348,7 +348,13 @@ function printTraversalDetails (traversals) { } } if (node.hasOwnProperty('options')) { - var opts = optify(node.options); + let opts = optify(node.options); + if (opts.length > maxOptionsLen) { + maxOptionsLen = opts.length; + } + } else if (node.hasOwnProperty("traversalFlags")) { + // Backwards compatibility for < 3.2 + let opts = optify(node.traversalFlags); if (opts.length > maxOptionsLen) { maxOptionsLen = opts.length; } @@ -386,6 +392,8 @@ function printTraversalDetails (traversals) { if (traversals[i].hasOwnProperty('options')) { line += optify(traversals[i].options, true) + pad(1 + maxOptionsLen - optify(traversals[i].options, false).length) + ' '; + } else if (traversals[i].hasOwnProperty('traversalFlags')) { + line += optify(traversals[i].traversalFlags, true) + pad(1 + maxOptionsLen - optify(traversals[i].traversalFlags, false).length) + ' '; } else { line += pad(1 + maxOptionsLen) + ' '; } @@ -856,7 +864,13 @@ function processQuery (query, explain) { return keyword('FOR') + ' ' + variableName(node.outVariable) + ' ' + keyword('IN') + ' ' + collection(node.collection) + ' ' + annotation('/* ' + (node.reverse ? 'reverse ' : '') + node.index.type + ' index scan */'); case 'TraversalNode': - node.minMaxDepth = node.options.minDepth + '..' + node.options.maxDepth; + if (node.hasOwnProperty("options")) { + node.minMaxDepth = node.options.minDepth + '..' + node.options.maxDepth; + } else if (node.hasOwnProperty("traversalFlags")) { + node.minMaxDepth = node.traversalFlags.minDepth + '..' + node.traversalFlags.maxDepth; + } else { + node.minMaxDepth = '1..1'; + } node.minMaxDepthLen = node.minMaxDepth.length; rc = keyword('FOR '); diff --git a/scripts/startStandAloneAgency.sh b/scripts/startStandAloneAgency.sh index ab91636825..d9f6d14ef8 100755 --- a/scripts/startStandAloneAgency.sh +++ b/scripts/startStandAloneAgency.sh @@ -15,6 +15,7 @@ function help() { echo " -g/--gossip-mode Integer (0: Announce first endpoint to all" echo " 1: Grow list of known endpoints for each" echo " 2: Cyclic default: 0)" + echo " -b/--offset-ports Offsetports (default: 0, i.e. A:5001)" echo "" echo "EXAMPLES:" echo " scripts/startStandaloneAgency.sh" @@ -53,12 +54,20 @@ WAIT_FOR_SYNC="true" USE_MICROTIME="false" GOSSIP_MODE=0 START_DELAYS=0 +INTERACTIVE_MODE="" +XTERM="xterm" +XTERMOPTIONS="" +BUILD="build" while [[ ${1} ]]; do case "${1}" in -a|--agency-size) NRAGENTS=${2} shift;; + -i|--interactive) + INTERACTIVE_MODE=${2} + shift + ;; -p|--pool-size) POOLSZ=${2} shift;; @@ -95,6 +104,10 @@ while [[ ${1} ]]; do -s|--start-delays) START_DELAYS=${2} shift;; + -b|--port-offset) + PORT_OFFSET=${2} + shift + ;; -h|--help) help; exit 1 ;; @@ -148,15 +161,28 @@ if [[ $(( $NRAGENTS % 2 )) == 0 ]]; then exit 1 fi -MINP=0.5 -MAXP=2.5 + +if [ ! -z "$INTERACTIVE_MODE" ] ; then + if [ "$INTERACTIVE_MODE" == "C" ] ; then + ARANGOD="${BUILD}/bin/arangod " + CO_ARANGOD="$XTERM $XTERMOPTIONS -e ${BUILD}/bin/arangod --console " + echo "Starting one coordinator in terminal with --console" + elif [ "$INTERACTIVE_MODE" == "R" ] ; then + ARANGOD="$XTERM $XTERMOPTIONS -e rr ${BUILD}/bin/arangod --console " + CO_ARANGOD=$ARANGOD + echo Running cluster in rr with --console. + fi +else + ARANGOD="${BUILD}/bin/arangod " + CO_ARANGOD=$ARANGOD +fi + SFRE=2.5 COMP=200000 -KEEP=500 -BASE=5000 +BASE=$(( $PORT_OFFSET + 5000 )) if [ "$GOSSIP_MODE" = "0" ]; then - GOSSIP_PEERS=" --agency.endpoint $TRANSPORT://localhost:$BASE" + GOSSIP_PEERS=" --agency.endpoint $TRANSPORT://[::1]:$BASE" fi rm -rf agency @@ -168,13 +194,14 @@ shuffle count=1 + for aid in "${aaid[@]}"; do port=$(( $BASE + $aid )) if [ "$GOSSIP_MODE" = "2" ]; then nport=$(( $BASE + $(( $(( $aid + 1 )) % 3 )))) - GOSSIP_PEERS=" --agency.endpoint $TRANSPORT://localhost:$nport" + GOSSIP_PEERS=" --agency.endpoint $TRANSPORT://[::1]:$nport" fi if [ "$GOSSIP_MODE" = "3" ]; then @@ -182,21 +209,18 @@ for aid in "${aaid[@]}"; do for id in "${aaid[@]}"; do if [ ! "$id" = "$aid" ]; then nport=$(( $BASE + $(( $id )) )) - GOSSIP_PEERS+=" --agency.endpoint $TRANSPORT://localhost:$nport" + GOSSIP_PEERS+=" --agency.endpoint $TRANSPORT://[::1]:$nport" fi done fi printf " starting agent %s " "$aid" - build/bin/arangod \ + $ARANGOD \ -c none \ --agency.activate true \ $GOSSIP_PEERS \ - --agency.my-address $TRANSPORT://localhost:$port \ + --agency.my-address $TRANSPORT://[::1]:$port \ --agency.compaction-step-size $COMP \ - --agency.compaction-keep-size $KEEP \ - --agency.election-timeout-min $MINP \ - --agency.election-timeout-max $MAXP \ --agency.pool-size $POOLSZ \ --agency.size $NRAGENTS \ --agency.supervision true \ @@ -211,14 +235,14 @@ for aid in "${aaid[@]}"; do $LOG_LEVEL \ --log.use-microtime $USE_MICROTIME \ --server.authentication false \ - --server.endpoint $TRANSPORT://0.0.0.0:$port \ + --server.endpoint $TRANSPORT://[::]:$port \ --server.statistics false \ $SSLKEYFILE \ - > agency/$port.stdout 2>&1 & + | tee cluster/$PORT.stdout 2>&1 & PIDS+=$! PIDS+=" " if [ "$GOSSIP_MODE" == "1" ]; then - GOSSIP_PEERS+=" --agency.endpoint $TRANSPORT://localhost:$port" + GOSSIP_PEERS+=" --agency.endpoint $TRANSPORT://[::1]:$port" fi if [ $count -lt $POOLSZ ]; then if isuint $START_DELAYS; then @@ -237,6 +261,6 @@ done echo " done. Your agents are ready at port $BASE onward." #echo "Process ids: $PIDS" -echo "Try ${CURL}localhost:5000/_api/agency/config." +echo "Try ${CURL}[::1]:5000/_api/agency/config."