From 025bb3da51ec9336c2171868b82eb15c5f1b8def Mon Sep 17 00:00:00 2001 From: Andreas Streichardt Date: Mon, 22 Feb 2016 17:36:45 +0100 Subject: [PATCH 1/5] cmake build locations vs. startLocalCluster --- scripts/startLocalCluster.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/scripts/startLocalCluster.sh b/scripts/startLocalCluster.sh index 46c2bad58d..e613b3483b 100755 --- a/scripts/startLocalCluster.sh +++ b/scripts/startLocalCluster.sh @@ -33,7 +33,7 @@ rm -rf cluster mkdir cluster cd cluster echo Starting agency... -../bin/etcd-arango > /dev/null 2>&1 & +../build/bin/etcd-arango > /dev/null 2>&1 & cd .. sleep 1 @@ -47,7 +47,7 @@ start() { PORT=$2 mkdir cluster/data$PORT echo Starting $TYPE on port $PORT - bin/arangod --database.directory cluster/data$PORT \ + build/bin/arangod --database.directory cluster/data$PORT \ --cluster.agency-endpoint tcp://127.0.0.1:4001 \ --cluster.my-address tcp://127.0.0.1:$PORT \ --server.endpoint tcp://127.0.0.1:$PORT \ @@ -58,6 +58,9 @@ start() { --server.disable-statistics true \ --server.foxx-queues false \ --server.foxx-queues false \ + --javascript.startup-directory ./js \ + --server.disable-authentication true \ + --javascript.app-path ./js/apps \ > cluster/$PORT.stdout 2>&1 & } @@ -71,7 +74,7 @@ startTerminal() { PORT=$2 mkdir cluster/data$PORT echo Starting $TYPE on port $PORT - xterm $XTERMOPTIONS -e bin/arangod --database.directory cluster/data$PORT \ + xterm $XTERMOPTIONS -e build/bin/arangod --database.directory cluster/data$PORT \ --cluster.agency-endpoint tcp://127.0.0.1:4001 \ --cluster.my-address tcp://127.0.0.1:$PORT \ --server.endpoint tcp://127.0.0.1:$PORT \ @@ -81,6 +84,9 @@ startTerminal() { --log.requests-file cluster/$PORT.req \ --server.disable-statistics true \ --server.foxx-queues false \ + --javascript.startup-directory ./js \ + --javascript.app-path ./js/apps \ + --server.disable-authentication true \ --console & } @@ -94,7 +100,7 @@ startDebugger() { PORT=$2 mkdir cluster/data$PORT echo Starting $TYPE on port $PORT with debugger - bin/arangod --database.directory cluster/data$PORT \ + build/bin/arangod --database.directory cluster/data$PORT \ --cluster.agency-endpoint tcp://127.0.0.1:4001 \ --cluster.my-address tcp://127.0.0.1:$PORT \ --server.endpoint tcp://127.0.0.1:$PORT \ @@ -103,8 +109,11 @@ startDebugger() { --log.file cluster/$PORT.log \ --log.requests-file cluster/$PORT.req \ --server.disable-statistics true \ + --javascript.startup-directory ./js \ + --javascript.app-path ./js/apps \ + --server.disable-authentication true \ --server.foxx-queues false & - xterm $XTERMOPTIONS -title "$TYPE $PORT" -e gdb bin/arangod -p $! & + xterm $XTERMOPTIONS -title "$TYPE $PORT" -e gdb build/bin/arangod -p $! & } PORTTOPDB=`expr 8629 + $NRDBSERVERS - 1` @@ -175,6 +184,6 @@ done echo Done, your cluster is ready at for p in `seq 8530 $PORTTOPCO` ; do - echo " bin/arangosh --server.endpoint tcp://127.0.0.1:$p" + echo " build/bin/arangosh --server.endpoint tcp://127.0.0.1:$p" done From 5b733abcebc49e4b8c2779345547242cc6cae217 Mon Sep 17 00:00:00 2001 From: hkernbach Date: Mon, 22 Feb 2016 17:46:58 +0100 Subject: [PATCH 2/5] bugfixes webui --- .../aardvark/APP/frontend/js/templates/arangoTable.ejs | 9 ++++++++- .../APP/frontend/js/templates/collectionsItemView.ejs | 8 ++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/templates/arangoTable.ejs b/js/apps/system/_admin/aardvark/APP/frontend/js/templates/arangoTable.ejs index 635cb1f30f..1e1700d8ce 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/templates/arangoTable.ejs +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/templates/arangoTable.ejs @@ -19,7 +19,14 @@ <% if (content.rows.length === 0) { %> - No content. + <% var xcounter = 0; %> + <% _.each(content.titles, function(y) {%> + <% if (xcounter === 0) { %> + No content. + <% } else { %> + + <% } %> + <% xcounter++; });%> <% }; %> diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/templates/collectionsItemView.ejs b/js/apps/system/_admin/aardvark/APP/frontend/js/templates/collectionsItemView.ejs index 66160e1907..f58ce6960e 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/templates/collectionsItemView.ejs +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/templates/collectionsItemView.ejs @@ -17,11 +17,15 @@
<%= model.get('desc') %>
- <% } else if (model.get('status') === "loaded" || model.get('status') === 'unloaded') { %> - <% if (!model.get('locked')) { %> + <% } else if (model.get('status') === "loaded" || model.get('status') === 'unloaded' || model.get('status') === 'loading' || model.get('status') === 'unloading') { %> + <% if (!model.get('locked') && model.get("status") !== "loading" && model.get("status") !== "unloading") { %>
<%= model.get('status') %>
+ <% } else if (model.get('status') === 'loading' || model.get('status') === 'unloading') { %> +
+ <%= model.get('status') %> +
<% } else { %>
<%= model.get('status') %> From c9bb0f1eeb5979d686dfdca93f6cea96f7cae29f Mon Sep 17 00:00:00 2001 From: Andreas Streichardt Date: Mon, 22 Feb 2016 18:15:02 +0100 Subject: [PATCH 3/5] custom data dir --- scripts/startLocalCluster.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/startLocalCluster.sh b/scripts/startLocalCluster.sh index e613b3483b..67c7965dac 100755 --- a/scripts/startLocalCluster.sh +++ b/scripts/startLocalCluster.sh @@ -33,7 +33,7 @@ rm -rf cluster mkdir cluster cd cluster echo Starting agency... -../build/bin/etcd-arango > /dev/null 2>&1 & +../build/bin/etcd-arango --data-dir cluster/agency > /dev/null 2>&1 & cd .. sleep 1 From 75d464ab8bb07ca02e62b73d8d7d8c15b5cbdfd6 Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Mon, 22 Feb 2016 22:33:41 +0100 Subject: [PATCH 4/5] stop monitor on shutdown --- arangod/RestServer/ArangoServer.cpp | 7 +------ lib/Basics/Common.h | 1 + lib/Basics/WorkMonitor.cpp | 5 ++++- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/arangod/RestServer/ArangoServer.cpp b/arangod/RestServer/ArangoServer.cpp index cd92352d30..a21eb24d0f 100644 --- a/arangod/RestServer/ArangoServer.cpp +++ b/arangod/RestServer/ArangoServer.cpp @@ -826,6 +826,7 @@ void ArangoServer::buildApplicationServer() { } int ArangoServer::startupServer() { + InitializeWorkMonitor(); TRI_InitializeStatistics(); OperationMode::server_operation_mode_e mode = @@ -1174,12 +1175,6 @@ int ArangoServer::startupServer() { } - // ............................................................................. - // start the work monitor - // ............................................................................. - - InitializeWorkMonitor(); - // ............................................................................. // start the main event loop // ............................................................................. diff --git a/lib/Basics/Common.h b/lib/Basics/Common.h index ad3862dd3f..fe3c75a36a 100644 --- a/lib/Basics/Common.h +++ b/lib/Basics/Common.h @@ -204,6 +204,7 @@ static inline uint32_t TRI_64to32(uint64_t x) { #define FATAL_ERROR_EXIT(...) \ do { \ + std::abort(); \ std::string bt; \ TRI_GetBacktrace(bt); \ if (!bt.empty()) { \ diff --git a/lib/Basics/WorkMonitor.cpp b/lib/Basics/WorkMonitor.cpp index 461c7a38dc..6b163627d6 100644 --- a/lib/Basics/WorkMonitor.cpp +++ b/lib/Basics/WorkMonitor.cpp @@ -601,4 +601,7 @@ void arangodb::InitializeWorkMonitor() { /// @brief stops the work monitor //////////////////////////////////////////////////////////////////////////////// -void arangodb::ShutdownWorkMonitor() { WORK_MONITOR.beginShutdown(); } +void arangodb::ShutdownWorkMonitor() { + WORK_MONITOR_STOPPED.store(true); + WORK_MONITOR.beginShutdown(); +} From 0d60101c1729d430de7505c484af0a9415e58779 Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Tue, 23 Feb 2016 00:27:52 +0100 Subject: [PATCH 5/5] removed abort --- lib/Basics/Common.h | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/Basics/Common.h b/lib/Basics/Common.h index fe3c75a36a..ad3862dd3f 100644 --- a/lib/Basics/Common.h +++ b/lib/Basics/Common.h @@ -204,7 +204,6 @@ static inline uint32_t TRI_64to32(uint64_t x) { #define FATAL_ERROR_EXIT(...) \ do { \ - std::abort(); \ std::string bt; \ TRI_GetBacktrace(bt); \ if (!bt.empty()) { \