1
0
Fork 0

Merge branch 'devel' of github.com:arangodb/arangodb into devel

This commit is contained in:
hkernbach 2016-11-02 14:57:01 +01:00
commit 7903fcf7bb
3 changed files with 42 additions and 8 deletions

View File

@ -2777,7 +2777,7 @@ AstNode* Ast::optimizeIndexedAccess(AstNode* node) {
// found a string value (e.g. a['foo']). now turn this into
// an attribute access (e.g. a.foo) in order to make the node qualify
// for being turned into an index range later
StringRef indexValue(index->getString());
StringRef indexValue(index->getStringValue(), index->getStringLength());
if (!indexValue.empty() && (indexValue[0] < '0' || indexValue[0] > '9')) {
// we have to be careful with numeric values here...

View File

@ -116,6 +116,11 @@ add_custom_target(copy_nsis_packages
list(APPEND COPY_PACKAGES_LIST copy_nsis_packages)
add_custom_target(copy_zip_packages
COMMAND cp *.zip ${PACKAGE_TARGET_DIR})
list(APPEND COPY_PACKAGES_LIST copy_zip_packages)
add_custom_target(remove_packages
COMMAND rm -f *.zip
COMMAND rm -f *.exe

View File

@ -10,6 +10,10 @@ function help() {
echo " -l/--log-level Log level (INFO|DEBUG|TRACE default: INFO)"
echo " -w/--wait-for-sync Boolean (true|false default: true)"
echo " -m/--use-microtime Boolean (true|false default: false)"
echo " -s/--start-delays Integer ( default: 0)"
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 ""
echo "EXAMPLES:"
echo " scripts/startStandaloneAgency.sh"
@ -24,6 +28,8 @@ TRANSPORT="tcp"
LOG_LEVEL="INFO"
WAIT_FOR_SYNC="true"
USE_MICROTIME="false"
GOSSIP_MODE=0
START_DELAYS=0
while [[ ${1} ]]; do
case "${1}" in
@ -51,6 +57,14 @@ while [[ ${1} ]]; do
USE_MICROTIME=${2}
shift
;;
-g|--gossip-mode)
GOSSIP_MODE=${2}
shift
;;
-s|--start-delays)
START_DELAYS=${2}
shift
;;
-h|--help)
help
exit 1
@ -81,12 +95,15 @@ else
fi
printf "Starting agency ... \n"
printf " agency-size: %s," "$NRAGENTS"
printf " pool-size: %s," "$POOLSZ"
printf " transport: %s," "$TRANSPORT"
printf " log-level: %s," "$LOG_LEVEL"
printf " use-microtime: %s," "$USE_MICROTIME"
printf " wait-for-sync: %s\n" "$WAIT_FOR_SYNC"
printf " agency-size: %s," "$NRAGENTS"
printf " pool-size: %s," "$POOLSZ"
printf " transport: %s," "$TRANSPORT"
printf " log-level: %s," "$LOG_LEVEL"
printf "\n"
printf " use-microtime: %s," "$USE_MICROTIME"
printf " wait-for-sync: %s," "$WAIT_FOR_SYNC"
printf " start-delays: %s," "$START_DELAYS"
printf " gossip-mode: %s\n" "$GOSSIP_MODE"
if [ ! -d arangod ] || [ ! -d arangosh ] || [ ! -d UnitTests ] ; then
echo Must be started in the main ArangoDB source directory.
@ -104,15 +121,23 @@ SFRE=2.5
COMP=1000
BASE=5000
if [ "$GOSSIP_MODE" = "0" ]; then
GOSSIP_PEERS=" --agency.endpoint $TRANSPORT://localhost:$BASE"
fi
rm -rf agency
mkdir -p agency
PIDS=""
for aid in `seq 0 $(( $POOLSZ - 1 ))`; do
port=$(( $BASE + $aid ))
if [ "$GOSSIP_MODE" = 2 ]; then
nport=$(( $BASE + $(( $(( $aid + 1 )) % 3 ))))
GOSSIP_PEERS=" --agency.endpoint $TRANSPORT://localhost:$nport"
fi
build/bin/arangod \
-c none \
--agency.activate true \
--agency.endpoint $TRANSPORT://localhost:$BASE \
$GOSSIP_PEERS \
--agency.my-address $TRANSPORT://localhost:$port \
--agency.compaction-step-size $COMP \
--agency.pool-size $POOLSZ \
@ -136,6 +161,10 @@ for aid in `seq 0 $(( $POOLSZ - 1 ))`; do
> agency/$port.stdout 2>&1 &
PIDS+=$!
PIDS+=" "
if [ "$GOSSIP_MODE" == "1" ]; then
GOSSIP_PEERS+=" --agency.endpoint $TRANSPORT://localhost:$port"
fi
sleep $START_DELAYS
done
echo " done. Your agents are ready at port $BASE onward."