1
0
Fork 0
Commit Graph

5750 Commits

Author SHA1 Message Date
Dan Larkin-York 13e24b2db9 Convert many uses of ClusterComm to Fuerte (#10154) 2019-10-10 14:03:33 +02:00
Jan 79c3187036
fixed issue #10193 (#10195) 2019-10-09 10:54:40 +02:00
Simon 8be084dc71 Feature/fuerte cluster 9000 (#10137) 2019-10-08 21:06:38 +02:00
Jan af5e3d4763
don't taint hash set if insert/emplace fails for whatever reason (#10179) 2019-10-08 14:29:20 +02:00
Jan 21b0311d57
rename minReplicationFactor to writeConcern (#10118) 2019-10-07 15:12:15 +02:00
Jan a1775b7930
cleanup some of the internal APIs a bit (#10152) 2019-10-03 00:02:27 +02:00
Wilfried Goesgens 1bbdea4dd4 Bug fix/one more place to do preceding dir char wrong (#10150)
* make sure we don't build paths that start with two \'s

* fix condition
2019-10-02 22:55:30 +03:00
KVS85 c8c1b07d40
Revert "make sure we don't build paths that start with two \'s (#10144)" (#10148)
This reverts commit 1ad3d1a327.
2019-10-02 18:47:05 +03:00
Jan 9c4d424368
ignore files in .bin when copying js files (#10145) 2019-10-02 17:46:29 +02:00
Wilfried Goesgens 1ad3d1a327 make sure we don't build paths that start with two \'s (#10144) 2019-10-02 18:35:14 +03:00
Kaveh Vahedipour dc6dba27a2 add repository address normalisation (#10113)
* add repository address normalisation
2019-10-02 11:38:38 +02:00
Simon 9040f1d18a Fuerte + Pregel + Agency = 🥑 (#10110) 2019-10-01 11:19:18 +02:00
Jan 2e293b85ca
Bug fix/cppcheck issues (#10105) 2019-09-30 09:27:33 +02:00
Jan c0136b49c7
use static_cast instead of dynamic_cast (#10095)
* use static_cast instead of dynamic_cast

* remove virtual inheritance
2019-09-27 12:58:52 +02:00
Wilfried Goesgens 636b2e5d5f fixed version of arangosh result evaluation refactoring - properly count objects (#10080) 2019-09-26 12:07:52 +02:00
Dan Larkin-York a83c2323c9 Refactor ApplicationServer stack (#9965) 2019-09-25 17:31:59 +02:00
Markus Pfeiffer 0b9dfb4b9b Subquery Start/End Nodes (#9983)
* Add Start/End subquery node skeleton

* Added a test query that triggers complex interna in the future and needs to proof that our work is side-effect free.

* Add template function to statically assert size of type

* Add Start/End subquery node skeleton

* Add Start/End subquery node creation to ExecutionNode

* Cleanup SubqueryEndNode

* Add test file

* Add isEqualTo to ExecutionNode

* Subquery nodes cleanup

* Update ExecutionNode tests

* Updates to testing code

* More updates

* Add optimizer rule

* Fix optimizer rule

* Fix optimizer rule (again)

* Add a public function to get plan from query

* Fix register planning

* Add test for splicing subquery nodes

* add static asserts for sizes of SubqueryStartNode and SubqueryEndNode

* Add comment about statically asserted size

* Fix isEqualTo virtual and override dance.

* Fix isEqualTo, remove static_assert_size

* Remove a TODO; the plan owns the ExecutionNodes

* Only add stealPlan to Query when testing

* Remove another static_assert_size

* Disabled subquery splice rule by default

* temporarily modified test

* Fixed windows compile

* Fixed unused variable warning
2019-09-25 12:35:18 +02:00
Wilfried Goesgens 41c07102c8 Feature/programm options new vector type (#10071) 2019-09-25 10:39:27 +02:00
Wilfried Goesgens 61cbff5e2e Fix windows path handling not to slip into UNC lookup (#10073)
* make sure that we don't get more than one leading directory separator in front of the path, so windows doesn't mistakenly look it up as a UNC.
2019-09-25 10:23:04 +02:00
Simon ac2158ee22 Async el cheapo (#10061) 2019-09-24 12:00:13 +02:00
Jan Christoph Uhde 0b8c75c7b7 one shard db - devel (#9395) 2019-09-23 15:48:37 +02:00
Tobias Gödderz aa14af9ae0 Extended the range of a suppressed warning for MSVC (#10039) 2019-09-20 13:09:34 +02:00
jsteemann 85bdf6ef01 fixit 2019-09-19 12:40:33 +02:00
Jan 41b0717bc9
remove unused code (#10043) 2019-09-19 12:25:25 +02:00
jsteemann 8d45b52bc7 Merge branch 'devel' of github.com:arangodb/arangodb into devel 2019-09-19 12:21:56 +02:00
jsteemann 13c98b82b5 added message 2019-09-19 12:21:37 +02:00
Max Neunhöffer 71c8314107 Add more strong references to pthread stuff. (#10038)
* Add more strong references to pthread stuff.

* Circumvent libgcc/libmusl mistake in multi-threaded detection.

* CHANGELOG.
2019-09-19 12:36:15 +03:00
Jan 46f3fa6923
fix graph error message (#10041) 2019-09-19 10:32:36 +02:00
jsteemann 1ebcd2dfb2 fix compile warning about type signedness 2019-09-18 14:19:57 +02:00
jsteemann 76dd9e5031 fix LTO warning 2019-09-18 14:19:29 +02:00
Tobias Gödderz 4b81ed33b7 Interprocedural optimizations (#9596)
* Enable IPO (LTO) via CMake

* Use separate IPO_ENABLED variable

* Enabled IPO for more binaries

* Enabled IPO for arangobackup

* Suppress an MSVC warning (though it is not unjustified...)

* Fix static builds, broken due to Policy CMP0060 introduced in cmake 3.3

* Removed policies superseded by minimum cmake version

* Disable IPO with google tests due to a g++ bug

* Disable IPO with google tests only on AUTO

* Disable warning for correct line

* Enabled IPO for additional libs

* Fixed some problems found with IPO enabled

- Fixed ODR violation in Pregel
- Removed unused code in ClusterMethods
- Avoid possible uninitialized variable usage

* Set IPO globally, except for 3rdParty libs
2019-09-18 11:29:37 +02:00
jsteemann ce6489b761 remove unused function 2019-09-16 19:56:47 +02:00
Tobias Gödderz 7d091523e5 Fixed some problems found with IPO enabled (#10020) 2019-09-16 17:10:13 +02:00
Jan 84ad504a6c
corrected several wrong macro names (#9971) 2019-09-11 16:45:32 +02:00
Max Neunhöffer 7d5313611f
Fix a shutdown busy loop after main if two exceptions collide. (#9978) 2019-09-11 14:47:49 +02:00
Jan aada04e75b
don't assert/crash when using an unknown collection/shard (#9959) 2019-09-11 12:03:13 +02:00
KVS85 4fc39dd4b3
Debug segfault reimplementation (#9940)
* Changed debugSegfault to debugTerminate

* Fix *nix compilation

* More data for broken reconnect

* Remove circumventCores completely

* Fix forgotten calls
2019-09-09 23:07:45 +03:00
Simon 6b7fb0994e Non-Blocking reads (#9883) 2019-09-05 19:26:01 +02:00
Kaveh Vahedipour ad36adc354 Feature/hotbackup list retries (#9924)
* retry hot backup listing for 2 minutes in cluster before giving up
2019-09-05 16:44:43 +02:00
Jan 7e500f5597
drop views on test teardown (#9919) 2019-09-05 15:03:02 +02:00
Markus Pfeiffer 753ff4aa67 Feature/atomic database creation 2 (#9826) 2019-09-05 12:38:07 +02:00
Jan ef371cf619
Automatically turn values for deprecated startup option parameters `--log.use-microtime` and `--log.use-local-time` into equivalent option values of the new, preferred option `--log.time-format`. (#9913) 2019-09-05 12:22:24 +02:00
Tobias Gödderz b7f8f01a22 Feature/split libarangoserver (#9670)
* Made usage of named variables for targets a little more consistent

* Bumped minimum cmake version

- removed policies superseded by minimum cmake version
- fixed static linking due to new policy CMP0060

* Fixed library suffixes for windows

* Extracted libs arango_mmfiles and _rocksdb from arangoserver

* Replaced target variables by constants

* Extracted arango_cluster_engine from arangoserver

* Extracted llhttp from arangoserver

* First successful split of arangoserver

* Moved enterprise files to enterprise

* Again only optionally include RestTestHandler and AcceptorUnixDomain

* Cleaned source files from other libraries

* Removed old commented sources

* Split off a small third library

* Fixed boost dependency for cluster engine

* Added some missing dependencies

* Added arango_geo dep, and -J on windows

* Began to split off an arango_graph lib

* Moved more files to arango_graph

* Do not set /J globally for ATL

* Moved more files to arango_graph

* Moved graph-RestHandlers to arango_graph

* Added arango_geo dependency to _mmfiles and _rocksdb

* Updated graph dependencies

* Split off arango_pregel

* Split off arango_aql

* Added missing boost_system dependency to pregel

* Split off arango_vocbase

* Cleanup

* Added missing boost_system dependency for arango_vocbase

* Split off arango_v8server

* Split off arango_utils

* Minor cleanup

* Split of arango_storage_engine

* Split off arango_indexes and arango_cache

* Fixed some dependencies

* Split off arango_replication

* Resolved two todos

* Split off arango_agency

* Reordered some statements

* Ordered dependency definitions alphabetically

* Cleaned some deps

* Break one cycle, comment on another

* Merge the remaining arangoserver_part[123] sources

* Moved some utils to vocbase to break cycles

* Added missing backtrace dependency to iresearch-s

* Added missing boost dependency

* Added dependency arango_indexes -> arango_geo

* Added deps to arango_cluster_engine, cleaned duplicate deps

* Broke remaining dependency cycles

* Actually, missed one cycle...

* Re-added include for Mac

* arango_cache needs SharedPRNG
2019-09-05 09:37:12 +02:00
Simon 72396e6b79 Bug fix/windows network (#9895) 2019-09-03 20:22:23 +02:00
jsteemann d1b1b6726f Revert "Feature/resource usage (#9647)"
This reverts commit 76afb5001e.
2019-09-03 12:48:02 +02:00
Frank Celler 575f818498 fixed includes for Mac 2019-09-02 16:57:31 +02:00
jsteemann 2cdb335584 removed unused method 2019-09-02 10:30:57 +02:00
Wilfried Goesgens 76afb5001e Feature/resource usage (#9647)
* spawn an arangosh that checks cluster nodes are responsive

* attempting to kill 0 may end up bad for us, prohibit it

* don't trip over this optional stuff.

* fix killing of spectator

* only write one line per minute

* fix function name

* print sHitlist of tests, add resource usage

* fix lint

* start refactoring result processing into its own library

* /proc reading only works on linux

* new result processing library

* clean up test loading flow, remove unused blacklist implementation

* measure SUT start/stop + test time

* lint

* more non-test variables

* improve test runner naming

* finish gathering statistics about start/run/stop

* use internal stats code for external processes too

* fix status in sample testcase

* tell that procdump is gone - it seems this happenes in reality without coredumps being written

* refactor test result analyzing, add utility to work with analyzers of json dumps from CI systems

* fix testcase error handling

* also run watcher for agency

* lint

* fix default options for test added default options

* if arguments occur multiple times, update value to an array

* start implementing some test analyzers

* fix color

* write json report unconditional

* add analyzer that searches for long setup/teardown tests

* enable thread dump; log error if we fail to acquire the threads

* disable procdump for the agency

* output error if we fail to get process stats

* fix json invocation

* add debug logging

* only add buildType if that directory actually exists

* trap sleepers

* trap sleepers

* trap sleepers

* trap sleepers

* trap sleepers

* disable thread counting on the wintendo

* disable thread counting on the wintendo

* more measurements

* more measurements

* one more place

* one more place

* remove debugging code

* Update js/client/modules/@arangodb/process-utils.js

Co-Authored-By: Dan Larkin-York <danielhlarkin@users.noreply.github.com>

* Update js/client/modules/@arangodb/process-utils.js

Co-Authored-By: Dan Larkin-York <danielhlarkin@users.noreply.github.com>

* Apply suggestions from code review

Co-Authored-By: Dan Larkin-York <danielhlarkin@users.noreply.github.com>

* rename as sugested by @dan

* undo debug changes

* lint, make cluster health monitor optional per default

* fix spawning of active failover SUT, fix cluster health monitor shutdown

* use std::find_if (as @dan sugested), fix log ids

* fix scope of before-time
2019-08-30 16:20:07 +03:00
Simon 0ee0cebb11 Non-Blocking inserts (#9823) 2019-08-30 09:17:58 +02:00
Jan 30b36a2a42
fix return value checks (#9852) 2019-08-29 20:38:53 +02:00
Simon cfde781767 Improve error messages for loop validation (#9837) 2019-08-28 19:11:54 +02:00
Jan 8e4c386086
Feature/enable tlsv13 (#9817) 2019-08-27 14:58:07 +02:00
Jan 8c13019900
don't create `arangosh_XXXXXX` directories (#9808) 2019-08-27 11:27:44 +02:00
jsteemann df761d2010 remove unused boost includes 2019-08-26 19:39:31 +02:00
Simon 9ef10919c2 Improve performance of non-intersection queries (#9797) 2019-08-26 10:58:42 +02:00
Dan Larkin-York 88c9074a39 Add user restrictions for streaming transactions. (#9793)
* Add user restrictions for streaming transactions.

* Remove overzealous check.
2019-08-23 15:31:50 +02:00
Jan 00bcc4954c
AQL date functions improvements (#9714) 2019-08-22 12:50:08 +02:00
Jan ec586667e4
downgrade WARN messages to INFO level (#9761) 2019-08-20 18:28:57 +02:00
Jan 885504cd77
Bug fix/fix signed int overflow (#9717) 2019-08-20 10:48:46 +02:00
Simon f88e5b56b0 Enforce stricter transaction limits (#9740) 2019-08-20 09:57:41 +02:00
Dan Larkin-York f7d41ad8fb Check scheduler queue return value (#9754) 2019-08-19 19:31:55 +02:00
Wilfried Goesgens 61f6143f5d fix pasting from the documentation (#9742)
* fix pasting from the documentation

* CHANGELOG

* Update CHANGELOG
2019-08-19 17:57:21 +03:00
Jan 346edaec3a issue #9654: make `--rocksdb.max-write-buffer-number` work (#9750)
* issue #9654: make `--rocksdb.max-write-buffer-number` work

* fix the logic
2019-08-19 09:42:08 -04:00
Jan a54e1fc427
Bug fix/add swagger apis for shards (#9734) 2019-08-19 12:44:20 +02:00
jsteemann 2735114c59 Revert "Check scheduler queue return value. (#9701)"
This reverts commit 41c1b571b9.
2019-08-19 10:13:48 +02:00
Dan Larkin-York 41c1b571b9 Check scheduler queue return value. (#9701) 2019-08-19 10:01:08 +02:00
Simon 8af83d5bd4 Auxilliary changes from timeseries branch (#9699) 2019-08-15 10:12:58 +02:00
Simon dde1a82fce Network Code V2 (#7962) 2019-08-14 17:25:03 +02:00
Simon 36ebf6f56f Add area calculations (#9693) 2019-08-14 10:08:44 +02:00
Tobias Gödderz 6b3e11dd40 Fixed error code to not re-use an old one (#9686) 2019-08-13 15:18:45 +02:00
Frank Celler 68ea717af4
Feature/set environment (#9688) 2019-08-13 09:18:16 +02:00
Simon 9d125ef5cb Add support for WGS84 on distances (#9672) 2019-08-12 13:05:56 +02:00
Frank Celler aa3d3f8e40
Feature/cleanup ccpcheck (#9665) 2019-08-12 11:11:49 +02:00
Tobias Gödderz 9cd332b958 Feature/rebootid notice changes (#9523)
* Consolidated _servers and _serverAdvertisedEndpoints, added rebootId, prepared change notifications

* Cleanup

* Added a RebootId type

* Began implementing RebootTracker (still WIP)

* Moved RebootId operators into the class

* Removed RebootId operator<< again

* Added tests, added CallbackGuard, removed/commented old RebootTracker code

* Fix: do not try to call unset callbacks

* Split one test, added another

* Added more tests

* Renamed tests, added more tests

* Fixed missing variable declarations

* Let MockServer appear to be started

* Reorded test, fixed naming

* Implemented callMeOnChange()

* Re-implemented RebootTracker (not yet working)

* Resolved a TODO, updated a test, added comments

* Call old callbacks immediately

* Fixed tests

* Use EXPECT_* instead of ASSERT_*

* Suppress a log message

* Resolved TODOs

* Reverted changes on reading ServersRegistered

* Update RebootTracker

* Introduce `rebootId` into ServerState for Cluster

 * A server *boots* if it is started on a previously non-existing data
   directory and hence does not have a UUID yet.
 * A server *reboots* if it is started on a pre-existing data directory

We keep the rebootId in the cluster's agency under
Current/ServersKnown/$uuid/rebootId.

When rebooting (and subsequently re-joining a cluster), the server increments
its rebootId in Phase 2 of registration. This way it can be detected within the
cluster whether a server was restarted.

This information will later be used to handle cases where server restarts can
lead to problems, for example with transactions or in-progress queries.

* Move rebootId into Current/ServersKnown/

* Fixed typo

* Fixed log ids

* Add deletion of ServersKnown/UUID from agency

* Add deletion of Current/ServersKnown/UUID to removeServer

* Clean up readRebootIdFromAgency and add retry loop around it

* Bugfix

* Added nolint comments

* Fixed initialization order

* Fixed ClusterInfo-test

* Added log messages

* Revert "Fixed ClusterInfo-test"

This reverts commit d983596979.

* Disabled assertion for google tests

* Ignore windows compile warning

* Always call loadServers in loadCurrent

* Fix really subtle bug when not returning a value

* Introduce `rebootId` into ServerState for Cluster

 * A server *boots* if it is started on a previously non-existing data
   directory and hence does not have a UUID yet.
 * A server *reboots* if it is started on a pre-existing data directory

We keep the rebootId in the cluster's agency under
Current/ServersKnown/$uuid/rebootId.

When rebooting (and subsequently re-joining a cluster), the server increments
its rebootId in Phase 2 of registration. This way it can be detected within the
cluster whether a server was restarted.

This information will later be used to handle cases where server restarts can
lead to problems, for example with transactions or in-progress queries.

* Move rebootId into Current/ServersKnown/

* Add deletion of ServersKnown/UUID from agency

* Add deletion of Current/ServersKnown/UUID to removeServer

* Clean up readRebootIdFromAgency and add retry loop around it

* Fixed compile error due to forbidden implicit cast

* Fixed compile error on windows

* Fixed compile error due to devel merge

* Removed dead comment

* Removed TODO note

* Extended comment

* Removed TODO note

* Fixed using an invalidated iterator

* Copy string only if necessary

* Fixed compile error
2019-08-12 09:33:22 +02:00
Simon 1e8234ad38 Bug fix/simon 19 08 07 (#9655) 2019-08-09 14:13:12 +02:00
Dan Larkin-York 4347f1abec Add missing includes for Windows builds. (#9657) 2019-08-08 13:03:37 +02:00
Dan Larkin-York 320c08ee4e Add constructors to fix cppcheck warnings. (#9648) 2019-08-07 08:23:16 +02:00
Dan Larkin-York 3d0246cb18 Decentralize includes (#9623) 2019-08-06 15:32:09 +02:00
Lars Maier ed496fe5dd Feature/hotbackup devel (#9495)
Hotbackup
2019-08-02 11:39:46 +02:00
Wilfried Goesgens 0abf2be222 Feature/add js isolate mem statistics (#9567) 2019-07-26 17:48:24 +02:00
Matthew Von-Maszewski 91b56a50a3
Feature: Add gzip and encryption to import/export (#9560)
* port of feature-3.4/mv-gzip-export to devel branch

* add explicit namespaces so gcc 6.3.0 would successfully compile

* add conditional cleanup of ENCRYPTION file from another branch

* use _lseek() for Windows build to avoid deprecated warning.

* change from ifdef for lseek variants to TRI_LSEEK.

* force Windows lseek to return Linux expected type.
2019-07-26 07:53:39 -04:00
Simon f7411627af Bug fix/http comm tasks (#9543) 2019-07-24 14:38:11 +02:00
Jan 973f00a997
Added startup error for bad temporary directory setting. (#9552)
* Added startup error for bad temporary directory setting.

  If the temporary directory (--temp.path) setting is identical to the database
  directory (`--database.directory`) this can eventually lead to data loss, as
  temporary files may be created inside the temporary directory, causing overwrites of
  existing database files/directories with the same names.
  Additionally the temporary directory may be cleaned at some point, and this would lead
  to an unintended cleanup of the database files/directories as well.
  Now, if the database directory and temporary directory are set to the same path, there
  will be a startup warning about potential data loss (though in ArangoDB 3.4 allowing to
  continue the startup - in 3.5 and higher we will abort the startup).
2019-07-24 12:47:42 +02:00
Michael Hackstein 36b1d290a9
Bug fix/failover with min replication factor (#9486)
* Improve collection time of IResearchQueryOptimizationTest

* Added a minReplicationFactor field in Collections. It is not possible to modify it yet and noone cares for it

* Added some assertion son minReplicationFactor

* Transaction API will now reject writes as soon as minimal replication factor is NOT fulfilled

* added minReplicationFactor to the user interface, preparation for the collection api changes

* added minReplicationFactor to VocBaseCollection, RestReplicationHandler, RestCollectionHandler, ClusterMethods, ClusterInfo and ClusterCollectionCreationInfo

* added minReplicationFactor usage to tests

* TODO TEMOPORARY COMMIT FOR TESTING PLEASE REVERT ME

* minReplicationFactor now able to change via collection  properties route

* fixed wrongly assert

* added minReplicationFactor to the graph management ui

* added minReplicationFactor to the gharial api

* Fixed off-by-one error in minReplicationFactor. We actually enforced one more.

* adjusted description of minReplicationFactor

* FollowerInfo Refactoring

* added gharial api graph creation tests with minimal replication factor

* proper cleanup of shell collection tests, removed lots of duplicate code, preparation for some new tests

* added collection create tests using invalid/valid names, replicationFactor and minReplicationFactor

* Debug logging

* MORE Debug logging

* Included replication fast lane

* Use correct minreplicationfactor

* modified debug logging

* Fixed compileissues

* MORE Debug logging

* MORE Debug logging

* MORE Debug logging

* MORE Debug logging

* MORE Debug logging

* MORE Debug logging

* MORE Debug logging

* Revert "MORE Debug logging"

This reverts commit dab5af28c0.

* Revert "MORE Debug logging"

This reverts commit 6134b664bd.

* Revert "MORE Debug logging"

This reverts commit 80160bdf3b.

* Revert "MORE Debug logging"

This reverts commit 06aabcdfe1.

* Removed debug output

* Added replication fast lane. Also refactored the commands as i cannot take it any more...

* Put some requests of RocksDBReplication onto CATCHUP Lane.

* Put some requests of MMFilesReplication onto CATCHUP Lane.

* Adjusted Fast and MED lane usage in Supervised scheduler

* Added changelog entry

* Added new features entry

* A new leader will now keep old followers in case of failover

* Update arangod/Cluster/ClusterCollectionCreationInfo.cpp

Co-Authored-By: Tobias Gödderz <tobias@arangodb.com>

* Fixed JSLINT

* Unified lane handling of replication handlers

* Sorry forgotten in last commit

* replaced strings with static strings

* more use of static strings

* optimized min repl description in the ui

* decr initial loop variable

* clean up of the createWithId test

* more use of static strings

* Update js/apps/system/_admin/aardvark/APP/frontend/js/views/collectionsView.js

Co-Authored-By: Tobias Gödderz <tobias@arangodb.com>

* Added some comments on condition, renamed variable as suggested in review

* Added check for min replicationFactor to be non-zero

* Added assertion

* Added function to modify min and max replication factor in one go

* added missing semicolon

* rm log devel

* Added a second information to follower info that can keep track of followers that have been in sync before a failover has taken place

* Maintenance reports previous version now to follower info. instead of lying by itself. The Follower Info now gets a failover save mode to report insync followers

* check replFactor against nr dbservers

* Add lie reporting in CURRENT

* Reverted most of my recent commits about Failover situation. The intended plan simply does not work out

* move replication checks from logical collection to rest collection handler

* added more replication tests

* Include assert only if we are not in gtest

* jslint

* set min repl factor to zero if satellite collection

* check replication attributes in v8 collection

* Initial commit, old plan, does not yet work

* fixed ires tests

* Included FailoverCandidates key. Not fully implemented

* fixed wrong assert

* unified in sync follower reporting

* fixed compiler errors

* Cleanup locking, and fixed potential deadlocks

* Comments about locking order in FollowerInfo.

* properly check uint

* Keep old leader as potential failover candidate

* Transaction methods now use followerInfo to check if the leader can write, this might have the sideeffect that 'failoverCandidates' are updated

* Let agency check failoverCandidates if possible

* Initialize member variables

* Use unified follower reporting in DBServerAgencySync

* Removed obsolete variable, collecting it somewhere else

* repl factor attr check

* Reimplemented previous followers, second attempt now. PhaseOne and PhaseTwo can now synchronize on current.

* Fixed assertion, forgot an off-by-one

* adjusted test to be more preciese now

* Fixed failove candidates list

* Disable write on dropping too many followers

* Allow to run updateFailoerCandidates multiple times with same leader.

* Final fixes, resilience tests now green, crossing fingers for jenkins

* Fixed race on atomics comparison

* Fixed invalid number type

* added nullptr handling

* added nullptr handling

* Removed invalid assert

* Make takeover of leadership an atomic operation

* Update tests/js/common/shell/shell-cluster-collection.js

Co-Authored-By: Tobias Gödderz <tobias@arangodb.com>

* Review fixes

* Fixed creation code to use takeoverLeadership

* Update arangod/Cluster/FollowerInfo.h

Co-Authored-By: Tobias Gödderz <tobias@arangodb.com>

* Applied review fixes

* There is no timeout

* Moved AQL + Pregel to INTERNAL_AQL lane, which is medium priority, to avoid deadlocks with Sync replication

* More review fixes

* Use difference if you want to compare two vectors...

* Use std::string ...

* Now check if we are in recovery mode

* Added documentation for minReplicationFactor

* Added readme update as well in documenation
2019-07-19 15:00:30 +02:00
Wilfried Goesgens c922c5f133 move deleting of ClusterComm threads to the unprepare of the ClusterFeature (#9369) 2019-07-19 13:53:00 +02:00
Wilfried Goesgens ca0f2b8b86 All hail to the SI (#9445) 2019-07-19 13:52:12 +02:00
Michael Hackstein cbcf561450
Feature/min replication factor (#9433)
* Added a minReplicationFactor field in Collections. It is not possible to modify it yet and noone cares for it

* Added some assertion son minReplicationFactor

* Transaction API will now reject writes as soon as minimal replication factor is NOT fulfilled

* added minReplicationFactor to the user interface, preparation for the collection api changes

* added minReplicationFactor to VocBaseCollection, RestReplicationHandler, RestCollectionHandler, ClusterMethods, ClusterInfo and ClusterCollectionCreationInfo

* added minReplicationFactor usage to tests

* TODO TEMOPORARY COMMIT FOR TESTING PLEASE REVERT ME

* minReplicationFactor now able to change via collection  properties route

* fixed wrongly assert

* added minReplicationFactor to the graph management ui

* added minReplicationFactor to the gharial api

* Fixed off-by-one error in minReplicationFactor. We actually enforced one more.

* adjusted description of minReplicationFactor

* FollowerInfo Refactoring

* added gharial api graph creation tests with minimal replication factor

* proper cleanup of shell collection tests, removed lots of duplicate code, preparation for some new tests

* added collection create tests using invalid/valid names, replicationFactor and minReplicationFactor

* Debug logging

* MORE Debug logging

* Included replication fast lane

* Use correct minreplicationfactor

* modified debug logging

* Fixed compileissues

* MORE Debug logging

* MORE Debug logging

* MORE Debug logging

* MORE Debug logging

* MORE Debug logging

* MORE Debug logging

* MORE Debug logging

* Revert "MORE Debug logging"

This reverts commit dab5af28c0.

* Revert "MORE Debug logging"

This reverts commit 6134b664bd.

* Revert "MORE Debug logging"

This reverts commit 80160bdf3b.

* Revert "MORE Debug logging"

This reverts commit 06aabcdfe1.

* Removed debug output

* Added replication fast lane. Also refactored the commands as i cannot take it any more...

* Put some requests of RocksDBReplication onto CATCHUP Lane.

* Put some requests of MMFilesReplication onto CATCHUP Lane.

* Adjusted Fast and MED lane usage in Supervised scheduler

* Added changelog entry

* Added new features entry

* A new leader will now keep old followers in case of failover

* Update arangod/Cluster/ClusterCollectionCreationInfo.cpp

Co-Authored-By: Tobias Gödderz <tobias@arangodb.com>

* Fixed JSLINT

* Unified lane handling of replication handlers

* Sorry forgotten in last commit

* replaced strings with static strings

* more use of static strings

* optimized min repl description in the ui

* decr initial loop variable

* clean up of the createWithId test

* more use of static strings

* Update js/apps/system/_admin/aardvark/APP/frontend/js/views/collectionsView.js

Co-Authored-By: Tobias Gödderz <tobias@arangodb.com>

* Added some comments on condition, renamed variable as suggested in review

* Added check for min replicationFactor to be non-zero

* Added assertion

* Added function to modify min and max replication factor in one go

* added missing semicolon

* rm log devel

* Added a second information to follower info that can keep track of followers that have been in sync before a failover has taken place

* Maintenance reports previous version now to follower info. instead of lying by itself. The Follower Info now gets a failover save mode to report insync followers

* check replFactor against nr dbservers

* Add lie reporting in CURRENT

* Reverted most of my recent commits about Failover situation. The intended plan simply does not work out

* move replication checks from logical collection to rest collection handler

* added more replication tests

* Include assert only if we are not in gtest

* jslint

* set min repl factor to zero if satellite collection

* check replication attributes in v8 collection

* fixed ires tests

* fixed wrong assert

* properly check uint

* repl factor attr check

* adjusted test to be more preciese now

* Fixed race on atomics comparison

* Fixed invalid number type

* Update tests/js/common/shell/shell-cluster-collection.js

Co-Authored-By: Tobias Gödderz <tobias@arangodb.com>

* Review fixes

* More review fixes
2019-07-19 13:02:28 +02:00
Simon d79ecd3870 Bug fix/comm task vst10 (#9516) 2019-07-19 11:00:49 +02:00
Simon 040e41854f fix the audit client testsuite (#9496) 2019-07-17 18:16:08 +02:00
jsteemann 4029e9d050 fix typo 2019-07-16 10:49:07 +02:00
Simon e5507d840f Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
Jan 1d15b50d22
Bug fix/applicationserver stop (#9414) 2019-07-08 20:30:05 +02:00
Andrey Abramov a793a4749f
Bug fix/rename iresearch analyzer feature (#9424)
* rename feature

* ensure 'MMFilesLogFileManager::SafeToUseInstance' is safe to use in multithreaded context

* address mac compilation issue
2019-07-08 15:46:57 +03:00
Jan 5c39692c20
remove several outdated error codes (#9402) 2019-07-05 13:36:16 +02:00
Jan Christoph Uhde 54169cd44f fix cluster-statistics (#9397) 2019-07-05 10:32:46 +02:00
Jan 1a58cc2213
add VelocyPackHelper::equal method (#9389) 2019-07-03 12:15:11 +02:00
Jan 2f90f5ec49
update velocypack version (#9379) 2019-07-03 12:14:52 +02:00
Jan 11f5f33659
make sure all error code names are prefixed with ERROR_ @fceller @kvs85 (#9384) 2019-07-02 18:07:33 +02:00
Jan 9cb08ded92
make the comparison functions unambiguous (#9349)
* make the comparison functions unambiguous

* added @kaveh's suggestion
2019-07-01 16:35:28 +02:00
Wilfried Goesgens 6561f21536 Feature/make rspec timeouteable (#9354)
* make rspec timeouteable (on windows for now)

* add timeout state, fix windows implementation

* abort testrun if a timeout in rspec occured

* lint

* fix scope of procdump stopper

* fix include scope

* fix invokation

* use proper variable to wait for
2019-06-28 15:01:04 +02:00