From e42144f93d0c73352ccef97cba64cc3633fec50a Mon Sep 17 00:00:00 2001 From: jsteemann Date: Wed, 26 Apr 2017 10:09:35 +0200 Subject: [PATCH 1/5] disable currently unused variable --- arangod/RocksDBEngine/RocksDBReplicationTailing.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arangod/RocksDBEngine/RocksDBReplicationTailing.cpp b/arangod/RocksDBEngine/RocksDBReplicationTailing.cpp index 4eaa932078..e6ae4d581e 100644 --- a/arangod/RocksDBEngine/RocksDBReplicationTailing.cpp +++ b/arangod/RocksDBEngine/RocksDBReplicationTailing.cpp @@ -43,7 +43,7 @@ class WBReader : public rocksdb::WriteBatch::Handler { explicit WBReader(TRI_vocbase_t* vocbase, uint64_t from, size_t& limit, bool includeSystem, VPackBuilder& builder) : _vocbase(vocbase), - _from(from), + /* _from(from), */ _limit(limit), _includeSystem(includeSystem), _builder(builder) {} @@ -170,7 +170,7 @@ class WBReader : public rocksdb::WriteBatch::Handler { private: TRI_vocbase_t* _vocbase; - uint64_t _from; + /* uint64_t _from; */ size_t& _limit; bool _includeSystem; VPackBuilder& _builder; From b226dfdc9a0b105cd62d2b3f730e0e6bb88bfc04 Mon Sep 17 00:00:00 2001 From: jsteemann Date: Wed, 26 Apr 2017 10:40:04 +0200 Subject: [PATCH 2/5] add missing include files --- arangod/Aql/ShortestPathBlock.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arangod/Aql/ShortestPathBlock.cpp b/arangod/Aql/ShortestPathBlock.cpp index ac9fe84f7e..d866c2f061 100644 --- a/arangod/Aql/ShortestPathBlock.cpp +++ b/arangod/Aql/ShortestPathBlock.cpp @@ -27,6 +27,9 @@ #include "Aql/ExecutionPlan.h" #include "Aql/Query.h" #include "Cluster/ClusterComm.h" +#include "Graph/AttributeWeightShortestPathFinder.h" +#include "Graph/ConstantWeightShortestPathFinder.h" +#include "Graph/ShortestPathFinder.h" #include "Graph/ShortestPathResult.h" #include "Transaction/Methods.h" #include "Utils/OperationCursor.h" From 7a03071444d3930ba07cb5e6c4c2eb9d6660f9f7 Mon Sep 17 00:00:00 2001 From: Max Neunhoeffer Date: Wed, 26 Apr 2017 10:53:43 +0200 Subject: [PATCH 3/5] Port 3.1 changes to devel, startStandAloneAgency.sh. --- scripts/startStandAloneAgency.sh | 56 +++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 16 deletions(-) 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." From 2e417a1576eddefe5e926e877253efab996f7ba7 Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Wed, 26 Apr 2017 10:50:38 +0200 Subject: [PATCH 4/5] db._explain should now be backwards-compatible if we access a 3.1 instance with a 3.2 arangosh --- js/common/modules/@arangodb/aql/explainer.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) 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 '); From 5beae6081b343ee8be5076dfe7caf562606f9515 Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Wed, 26 Apr 2017 11:04:01 +0200 Subject: [PATCH 5/5] Removed double include due to hidden merge conflict. --- arangod/Aql/ShortestPathBlock.cpp | 2 -- 1 file changed, 2 deletions(-) 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"