1
0
Fork 0
Commit Graph

17648 Commits

Author SHA1 Message Date
Jan a93733da9d
reset _activeTrx as early as possible to release locks (#10004)
* reset _activeTrx as early as possible to release locks

* moved code into if condition
2019-09-12 19:32:17 +02:00
Tobias Gödderz e113e36138 Make AQL's constrained heap play nice with fullCount (#9981) 2019-09-12 18:56:59 +02:00
Simon 98c3b5c7b3 Improve VST Auth errors handling (#9972) 2019-09-12 16:04:25 +02:00
Jan 77034c0441
disable the creation of TTL indexes on sub-attributes (#9994) 2019-09-12 15:29:33 +02:00
jsteemann fb706c162f use steady_clock 2019-09-12 13:32:33 +02:00
Jan 2dde7e2307
Bug fix/allow not like (#9989) 2019-09-12 12:54:02 +02:00
Jan 52f188f617
make sure the input for responsibleShard is always an object (#9993) 2019-09-12 12:50:30 +02:00
Jan 84ad504a6c
corrected several wrong macro names (#9971) 2019-09-11 16:45:32 +02:00
Simon 3d2952b23a Non block modify (#9963) 2019-09-11 15:37:02 +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
Dronplane 311b616542 Load library flag set to false for analyzer features (#9973) 2019-09-11 12:44:02 +03:00
Michael Hackstein d251c3316d
Fixed and enabled an accidentially disabled assertion (#9969)
* Fixed and enabled an accidentially disabled assertion

* Removed debug include
2019-09-11 09:04:31 +02:00
Jan 4cb08d2a0d
fix wrong assertion in AstHelper.h (#9964) 2019-09-10 15:46:41 +02:00
Frank Celler a0852d33a2
fixed typo in define (#9945) 2019-09-10 11:34:42 +02:00
Kaveh Vahedipour 3011846025 broken hotbackup list with (#9956)
* fix broken list of non existing id
2019-09-10 10:17:24 +02:00
Markus Pfeiffer d25ea0e377 Cleanup ServerState.cpp (#9923)
* Remove unused function mkdir()

* Remove some outdated comments

* Add include guards to AgencyStrings.h

* Move check for initialized agency out of registerAtAgencyPhase1

* Whitespace cleanup

* Address two minor comments from review
2019-09-10 10:06:16 +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
Dan Larkin-York 976a88c723 Make request forwarding (load-balancing) non-blocking (#9948)
* Make request forwarding (load-balancing) non-blocking.

* Apply suggestions from code review

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

* Address review comments.

* Use more appropriate method.
2019-09-09 20:32:37 +02:00
Jan 3a59abd1dc
various issues reported by cppcheck (#9962) 2019-09-09 20:32:04 +02:00
Tobias Gödderz 9e9fa3a4f1 Bug fix/allow agency ops in active failover (#9881)
* allow agency operations in active failover too

* Added regression test

* Allowed more calls in active failover for the health endpoint to work

* Updated CHANGELOG
2019-09-09 16:53:57 +02:00
Jan 98fea326ea
handle K_SHORTEST_PATHS where it was forgotten (#9954) 2019-09-09 14:54:31 +02:00
Tobias Gödderz 1d65a37cc8 Feature/agency paths framework (#9933)
* Added a skeleton framework for agency paths

* Added some basic tests

* Added missing header

* Move to shared_ptrs to parents

* Added a virtual base class

* Sprinkle some final specifiers

* Moved some code into class Path and simplified tests

* Added root() function

* Added assertions

* Added /arango/Supervision

* Replaced PathComponent by StaticComponent and added DynamicComponent

* Added /arango/Target

* Added /arango/Current

* Added /arango/Plan

* Added a TODO note

* Added the last missing top-level paths in /arango/

* Added aliases, cleaned up comment

* Fixed some specifiers

* s/typeof/decltype/
2019-09-09 14:04:12 +02:00
Jan 91cdcb840b
Bug fix/fix transaction errors (#9929) 2019-09-09 11:02:06 +02:00
Jan 9f078f363d
Bug fix/harden database creation against duplicate name (#9951) 2019-09-09 11:00:33 +02:00
Jan 35526deddf
improve handling of FILTERs that are known to always produce true or false (#9941) 2019-09-09 10:15:15 +02:00
Jan edfdf9e9f1
make smart graphs transaction-aware (#9912) 2019-09-06 11:21:20 +02: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
Max Neunhöffer d45757db51
Sort out google cloud storage as remote. (#9918)
* Add successful method to ClusterCommResult.
* Improve error forwarding for cluster internal communication.
2019-09-05 13:36:50 +02:00
Markus Pfeiffer 753ff4aa67 Feature/atomic database creation 2 (#9826) 2019-09-05 12:38:07 +02:00
Jan 5a433bc99c
attempt to crashes on hard shutdown of the MMFiles engine (#9900) 2019-09-05 12:27:14 +02:00
Jan 0b4d6cebb3
avoid lookup plus sequent insert/emplace for the fast path (#9903) 2019-09-05 12:25:56 +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
Michael Hackstein 1b1763c496
Added a stop to Network feature. There is a race condition on the gar… (#9892)
* Added a stop to Network feature. There is a race condition on the garbage collection post

* Added cleanup for analyzer test and view test

* Update tests/js/client/shell/shell-analyzer-rest-api.js

Fixed usage of wrong command
2019-09-05 08:31:11 +02:00
Jan 412e5280bc
fix audit test (#9886) 2019-09-04 17:44:00 +02:00
Jan 5572675106
Bug fix/remove base directory from include path (#9885) 2019-09-04 17:39:01 +02:00
Kaveh Vahedipour e6cb5d0f16 DropCollection is a FAST_LANE action and should not need much time or else retry. (#9893) 2019-09-04 15:34:02 +02:00
Simon 72396e6b79 Bug fix/windows network (#9895) 2019-09-03 20:22:23 +02:00
Kaveh Vahedipour d22386dbb6 agency lockup when removing 404ed callbacks and leadership preparation (#9847)
* Fix unused return value.
2019-09-03 16:59:41 +02:00
Dronplane 3bba2cd7db Fix for internal issue #633 (#9884)
* Made ANALYZER BOOST and MIN_MATCH non deterministic to prevent premature calls

* Returned Deterministic flag. Added context function implementation for cons arguments calls.

* Fixed filter volatility detection

* Added assertion

* Fixed formatting.  Removed redundant checks.

* Applied review suggestion

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>
2019-09-03 15:03:49 +03: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
Jan f1ca1d11ff
Bug fix/make graphs transaction aware (#9840) 2019-09-02 16:53:00 +02:00
Kaveh Vahedipour cced54cbc7 forceBackup is now allowInconsistent (#9850)
* forceBackup is now allowInconsistent
2019-09-02 10:32:58 +02:00
Jan 8e9f75cb5a
don't issue a warning when transaction log iterator reports more data (#9868) 2019-09-02 09:40:28 +02:00
Simon 2f9d1f8c51 Baby operations in cluster fix (#9870) 2019-09-02 09:36:37 +02:00
Jan d42490aa42
honor return values of important methods (#9859) 2019-08-30 23:11:19 +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
Jan 68291ce617
fixed issue #9862 (#9864) 2019-08-30 14:46:42 +02:00
Jan 7220af9602
cover more cases of "unique constraint violated" issues during replication (#9830) 2019-08-30 10:37:32 +02:00
Jan 13e1327723
fix return value when reboot id cannot be retrieved (#9857) 2019-08-30 10:34:47 +02:00
Jan ec3043dd8f
check for duplicate server endpoints on cluster startup (#9860) 2019-08-30 10:29:46 +02:00
Simon 0ee0cebb11 Non-Blocking inserts (#9823) 2019-08-30 09:17:58 +02:00
Heiko edba8f73fb added ensureCollections to orphan create method (#9833) 2019-08-29 23:01:53 +02:00
Jan 30b36a2a42
fix return value checks (#9852) 2019-08-29 20:38:53 +02:00
Simon 9a43b28f8f Improve ExecContext usability (#9806) 2019-08-28 19:05:23 +02:00
Dronplane 622d7a3edf Bug fix/issue #9795 (#9825)
* Fixed NOT IN clause in ArangoSearch

* Update CHANGELOG
2019-08-28 14:43:04 +03:00
Jan 86a496b8a3
Bug fix/fix in not in workaround (#9813) 2019-08-27 12:51:10 +02:00
Frank Celler 9aa12d7cdb
use LDAP_PATH instead of fixed one (#9812) 2019-08-27 10:13:17 +02:00
Frank Celler 6cb71f5746 Revert "use LDAP_PATH instead of fixed one"
This reverts commit b2344a6430.
2019-08-26 19:13:39 +02:00
Frank Celler b2344a6430 use LDAP_PATH instead of fixed one 2019-08-26 19:12:29 +02:00
Jan 2ee48956f7
upgrade curl to 7.65.3 (#9788) 2019-08-26 18:11:12 +02:00
Jan f3d24e0f67
remove now-obsolete warning (#9803) 2019-08-26 13:20:28 +02:00
Jan f01385e969
Bug fix/multi bugs (#9789) 2019-08-26 13:11:59 +02:00
Dan Larkin-York 1cc31e1085 Minimize unnecessary dropping of followers due to poorly set synchronous replication timeouts (#9798) 2019-08-26 11:20:02 +02:00
Jan Christoph Uhde 292be42910 count intermediate commits (#9753) 2019-08-26 11:07:57 +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
Kaveh Vahedipour 737dac3f3d remove 404-ed callbacks from agency (#9709)
* remove 404-ed callbacks from agency
* revert callback documents to published api :)
* array needs be inside so that multiple unobserves to same key are possible
2019-08-23 10:13:17 +02:00
Jan 00bcc4954c
AQL date functions improvements (#9714) 2019-08-22 12:50:08 +02:00
Dronplane 9559c8a80e Bug fix/internal issue #622 (#9781)
* Added analyzer cache invalidation for dropped database

* Fixed jslint reported errors
2019-08-21 23:34:24 +03:00
Jan ba02dc4b4d
mark AQL functions FULLTEXT, NEAR, WITHIN, WITHIN_RECTANGLE as cacheable (#9771) 2019-08-21 18:10:55 +02:00
jsteemann 2c47fd9943 reduce wait timeout, use move 2019-08-21 17:32:30 +02:00
Jan df504bb67a
fix potential spurious wakeups in scheduler code (#9770) 2019-08-21 09:42:38 +02:00
Dronplane 49dfb0a96e Bug fix/issue #9612 (#9764)
* Fixed ViewExecutionNode retrieval with deleted documents present in view

* Ported solution from 3.4 branch

* Changed index store in collection from vector to set. To make reversable indexes always last to execute

* Fixed re-enter hung

* Index storage fix

* Made index order deterministic

* Fix Mac build

* Added tests for index reversal

* Fixed Mac build

* Code cleanup

* Some cleanup

* Removed some redundand copy constructor calls

* Applied review comments

* Applied review comments
2019-08-20 19:34:23 +03:00
Jan ec586667e4
downgrade WARN messages to INFO level (#9761) 2019-08-20 18:28:57 +02:00
Jan 6ffb6067fb
slightly reorder boolean members to reduce struct sizes (#9762) 2019-08-20 18:28:09 +02:00
Jan fda4eea43f
make index selection more deterministic (#9735)
* make index selection more deterministic

* serialize indexes used by traversal with their estimates

* serialize selectivity estimates for shortest path nodes too

* fix assertion that doesn't hold true in unit tests

* fix test
2019-08-20 14:45:13 +02:00
Lars Maier 75411971f5 [devel] Move Shard Bug 4567124 (#9746)
* Fixed abort in moveshard in the case new leader is not in Current.
* Fixed special case where to server is an old follower.
* Updated Changelog.
2019-08-20 11:37:56 +02:00
Jan d68b4b4da0
Bug fix/fix invalid cast (#9755) 2019-08-20 10:32:08 +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
Jan 6fb6fb9f2f
dont fill cache on truncate (#9721) 2019-08-19 17:53:10 +02: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
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
Lars Maier 2ec2e1c1bc Background Get Ids (#9474)
* Obtain more ids via a background thread.
* Wait for thread to stop on shutdown.
* Added scope guard.
* Atomic weapons.
* Fix log level.
* One big lock!
* Added mutex for cleanup.
* Fixed unused variable.
2019-08-16 12:42:22 +02:00
Max Neunhöffer dc095f70c7
Fix agency bugs. (#9718)
* More logging in agency client inquiry.
* Fix first bug, increase logging for second.
* Handle timeout better in agency tests.
* Fix wrong term bug.
* Fix transact similarly.
* CHANGELOG.
2019-08-16 11:16:28 +02:00
Jan c9aa9e4b07
make forward/reverse iteration a template parameter (#9726) 2019-08-16 09:10:46 +02:00
Dronplane 2f6fb109f6 Bug fix/issue #9652 (#9697)
* Fixed analyzer properties equality check.

* Added re-normalization of stored analyzer properties

* Fixed analyzer name rules in rest and v8 handlers

* Fixed linux build

* Added tests for implicit system db name. Code cleanup.

* Analyzers access logic moved to separate function
2019-08-15 17:42:44 +03:00
Kaveh Vahedipour e91cc66b9e forward ported node corrections from 3.4 (#9700)
* forward ported node corrections from 3.4
* tests fixed
2019-08-15 15:48:49 +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
Andrey Abramov facc9c6435
bug-fix/issue-#9660 (#9704)
* fix issue

* Update tests/js/common/aql/aql-view-arangosearch-cluster.inc

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

* Update tests/js/common/aql/aql-view-arangosearch-noncluster.js

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

* fix cluster tests
2019-08-13 22:48:55 +03:00
Matthew Von-Maszewski 77fb9df2c0
Bugfix: Correct rocksdb statistics to report column family sums. (#9705)
* Update rocksdb statistics to properly report sums from column families.  Add throttle statistic.

* add cstddef include to allow clean compile with gcc 6.3.0 20170516
2019-08-13 14:35:09 -04:00
Frank Celler 68ea717af4
Feature/set environment (#9688) 2019-08-13 09:18:16 +02:00
Jan cffcbcdd38
fix return codes for concurrent writes to same documents (#9691) 2019-08-13 09:14:21 +02:00
Jan 0610e544fe
fixed issue #9679 (#9681) 2019-08-12 18:26:48 +02:00
Joerg Schad 487b8b3a45
Consistent punctuation. (#9689) 2019-08-12 18:10:36 +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
Jan 6ad0a995b8
various replication improvements: (#9676)
- better debuggability (more log details)
- shorter minimum wait delay in active failover
- fixed too early pruning of WAL files on leaders
2019-08-12 10:53:20 +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
Andrey Abramov 70de5feaa7
bug-fix/internal-issue-#591 (#9639)
* update iresearch

* update iresearch

* fix compilation errors

* update iresearch
2019-08-09 18:12:35 +03:00
Jan 5576e44547 miscellaneous adjustments to pacify cppcheck (#9677) 2019-08-09 14:29:21 +02:00
Simon 1e8234ad38 Bug fix/simon 19 08 07 (#9655) 2019-08-09 14:13:12 +02:00
Frank Celler cf26b3a39e removed unused variable 2019-08-09 10:01:14 +02:00
Jan b57224f85c
remove unused instance variable (#9662) 2019-08-08 14:35:20 +02:00
Max Neunhöffer b7dd51229d
Create TakeoverShardLeader job. (#9653)
* Create TakeoverShardLeader job.
* Add TakeoverShardLeadership to Action factory.
* Add log message at level debug.
* Sort out LOG_TOPIC ids.
* Fix unit tests.
2019-08-07 16:49:08 +02:00
Lars Maier 492057d4f4 [devel] Resign Leadership (#9427)
* First version of ResignLeadership Job.
* Port some performance optimizations from CleanOutServerJob.
* Draft of resigning leadership on shutdown.
* Moved code into Maintenance Feature. Fixed beginShutdown.
2019-08-07 15:02:17 +02:00
Jan 7df14eaf51
get rid of _resolvedNames and _nameLock (#9649) 2019-08-07 10:29:24 +02:00
Jan 5452b01990
Bug fix/optimizations 06 08 2019 (#9641) 2019-08-06 16:04:39 +02:00
jsteemann 963d8eed57 fix compile error 2019-08-06 15:54:53 +02:00
Dan Larkin-York 3d0246cb18 Decentralize includes (#9623) 2019-08-06 15:32:09 +02:00
Lars Maier 715a3b19b0 Fast Controlled Leaderchange (#9608)
* First draft of keeping in sync during controlled leader change.
* Test if server is actually the leader in plan.
* Update changelog.
* Added oldLeader check for set-the-leader request.
* Small fixes.
2019-08-05 12:08:21 +02:00
Jan 5bca5c1920
fix yet another undefined behavior (#9630) 2019-08-02 16:26:01 +02:00
Lars Maier af03f81562 Fail the FailedLeader Job if the new leader fails. (#9456)
* Fail the FailedLeader Job if the new leader fails.
* In case of timeout do not rollback.
* Fixed catch tests.
2019-08-02 11:49:04 +02:00
Jan 5282fa23c5
fix lagging AgencyCallbacks (#9617) 2019-08-02 11:44:01 +02:00
Lars Maier ed496fe5dd Feature/hotbackup devel (#9495)
Hotbackup
2019-08-02 11:39:46 +02:00
Dronplane 25caffe709 Bug fix/internal issue #616 (#9607)
* Added tests for analyzer removal and get with wrong db context

* Added Link ddl tests

* Added cross-base access to analyzers tests

* Fixed v8 analyzer remove/get operation. Removed redundant sorting.

* Fixed link creation with analyzer from other database

* Added check for cross-use analyzer from system db

* Fixed tests

* Fix typo in test

* Fixed comments

* Fixed indentation

* Link validation moved to LinkHelper

* Code cleanup

* Applied review comments

* Applied review comments

* Small reformatting

* added assert
2019-08-01 17:39:04 +03:00
Jan 7d829de89e added internal function getResponsibleServers() (#9604)
* added internal function getResponsibleServers()

* forgot to commit

* honor review comments

* Update arangod/Cluster/ClusterInfo.cpp

Potentially Fixed Unique logID usage. (let Jenkins test it)
2019-07-31 10:18:37 +02:00
KVS85 7945e01037
Fix ArangoSearch view creation errors (#9600) 2019-07-29 20:43:08 +03:00
Simon efa0cf4034 Add missing shared_from_this (#9594) 2019-07-29 16:53:26 +02:00
jsteemann 26e48d118e add missing includes 2019-07-29 14:06:30 +02:00
Jan 089895acf7
Bug fix/fix replication failures (#9592) 2019-07-29 13:24:52 +02:00
Jan Christoph Uhde fb839d1c40 stop optimization for nested collects (#9484) 2019-07-29 09:00:03 +02:00
Wilfried Goesgens 6b2486db21 don't keep the memory stats in the collections to save disk space (#9581) 2019-07-29 08:45:15 +02:00
Jan 5cc8e8ffb9
remove an optimization that is none (#9578) 2019-07-29 08:42:42 +02:00
Wilfried Goesgens 0abf2be222 Feature/add js isolate mem statistics (#9567) 2019-07-26 17:48:24 +02:00
Jan 50f41cec59
added missing function db._transactions(), and equivalent REST API route GET /_api/transaction (#9571) 2019-07-26 16:20:28 +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
Jan b62eee034b
fixed a bug in RTRIM implementation, fixed issue #9558 (#9562) 2019-07-25 13:04:46 +02:00
Jan 4ea95bc109
ascii art (#9565) 2019-07-25 13:03:30 +02: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
jsteemann 59e91838d8 added comments 2019-07-24 12:43:34 +02:00
Andrey Abramov d91fb35e39
Bug fix/iresearch trx (#9536)
* add tescase for trx and iresearch

* iresearch transaction integration

* adjust test

* reverse operation for correct index

* remove debug output

* address jsling errors

* address review comments

* forgot something

* added missing fail
2019-07-23 17:44:29 +03:00
Jan b5932c2edf
make TTL indexes behave like other indexes on creation (#9546)
* make TTL indexes behave like other indexes on creation

if a TTL index is already present on a collection, the previous behavior
was to make subsequent calls to `ensureIndex` fail unconditionally with
the error "there can only be one ttl index per collection".

now, we are comparing the attributes of the to-be-created index with the
attributes of the existing TTL index and make it only fail when the
attributes differ. if the attributes are identical, the `ensureIndex`
call succeeds and returns the existing index.
2019-07-23 13:53:58 +02:00
Michael Hackstein 987ad41364
Forward Port of changes in 3.5 review (#9544)
* Bug fix 3.5/min replication factor (#9524)

* Cherry-pick minReplicationFactor

* 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

* Removed merge conflict leftovers 0o, i should not trust the IDE

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

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

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

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

* Update Documentation/Books/Manual/Architecture/Replication/README.md

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

* Update CHANGELOG

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

* Update Documentation/Books/Manual/DataModeling/Collections/DatabaseMethods.md

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

* Update Documentation/Books/Manual/ReleaseNotes/NewFeatures35.md

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

* Update Documentation/DocuBlocks/Rest/Collections/1_structs.md

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

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

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

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

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

* Update Documentation/DocuBlocks/Rest/Graph/1_structs.md

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

* Apply suggestions from code review

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

* Adepted review requests, thanks for finding!

* Removed unnecessary const

* Apply suggestions from code review

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

* Moved initilization of variable more downwards

* Apply lock before notify_all()

* Remove documentation except DocuBlocks, covered by PR in docs repo

* Remove accidental indent

* Removed leftover merge conflict in documentation block
2019-07-23 13:14:38 +02:00
Jan 1e600c82a8
fix undefined behavior in Scheduler calculations (#9537) 2019-07-23 10:57:43 +02:00
m0ppers 1430c38865 Remove documentation, now here: github.com/arangodb/docs (#8918)
DocuBlocks and Scripts remain in this repository!
2019-07-22 16:03:26 +02:00
Jan 53cd3024d2
fixed an issue with smart joins if both collections were restricted to a (#9535) 2019-07-22 15:16:10 +02:00
Dronplane 11ef4bf18c Bug fix/internal issue #566 (#9497)
* Implemented TOKENS with array as parameter

* Binary terms encoded as Base64

* Fixed tests for base64 encoded values

* Code cleanup

* Fixed error codes

* Fixed Mac build issue

* Changed error code in case of type error. Code cleanup.

* Reverted MSVC formatting

* added changelog message

* Applied review comments

* Applied review comments

* numeric terms moved to raw pointer.

* Fix *nix build issue
2019-07-22 14:23:35 +03:00
Andrey Abramov ac9f940247
properly handle removals during recovery (#9528) 2019-07-19 22:32:48 +03:00
Michael Hackstein 19c25d1e3b Fixed merge conflict marker 2019-07-19 17:26:45 +02:00
Tobias Gödderz 7e98f56cf5 Bug fix/clean replication api wal tracking (#9473) 2019-07-19 15:44:14 +02:00
Jan cdbe63fa6e
Bug fix/fix races in collection creation (#9506) 2019-07-19 15:11:08 +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
Andrey Abramov 5bc6eac636
bug-fix/internal-issue-#609 (#9464)
* allow to access last operation tick of the transaction

* modify IResearchLink to rely on last commtted tick

* get rid of writing arangosearch markers to WAL

* further implementation

* local changes in iresearch

* add recovery states

* properly handle link creation during recovery

* adjust test cases

* properly handle nested transactions

* ungreylist recovery tests

* add more recovery tests

* do not use transaction to pass recovery tick

* do not store recoveryTick in MMFilesRecoveryState

* adjust tests

* fix mmfiles

* cleanup

* add context validity check

* fix tests

* fix more tests

* ensure subscription is not being released during commit

* address review comment

* final cleanup

* fix crash

* fix tests

* address test failures

* address review comments

* address review comments

* properly set recovery tick even if no recovery happened
2019-07-19 11:10:56 +03:00
Tobias Gödderz 001550ada7 Bug fix/count collect should skip (#9511)
* Make CountCollectExecutor skip rather than fetch

* Cleanup, fix and test for top-level variables

* Added CHANGELOG entry and tests
2019-07-19 10:08:36 +02:00
Jan 300b8e58f4
Bug fix/fix duplicate actions (#9452) 2019-07-19 09:17:19 +02:00
Jan 6d39a48435
Bug fix/fix uninitialized value (#9517) 2019-07-19 09:16:37 +02:00
Jan 16405482c8
micro optimizations (#9487) 2019-07-17 14:10:18 +02:00
Simon e5507d840f Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
Matthew Von-Maszewski f26403c4e3 BugFix: Some error results have messages that are not reporting (#9454)
* some error results have messages that are not reporting

* update CHANGELOG for rocksdb reporting fix

* Add mutex protection to errMsg usage per Jans code review
2019-07-11 18:29:39 +03:00
Andrey Abramov f2ff365206
bug-fix/fix-arangosearch-recovery-mmfiles (#9448)
* start maintenance arangosearch threads after recovery is done

* ensure flush subscription is not being deallocated while in use

* add some tests

* properly determine storage engine

* adjust default view options

* stick to old index meta format in 3.5

* address test failures

* and cluster tests
2019-07-11 11:42:08 +03:00
Michael Hackstein 43858dcd58 Bug fix/replication fast lane (#9373)
* Let sync replication go through FAST lane instead of SLOW lane. This should reduce the amount of drop followers under high load.

* First draft of a generic MockServer to test RestHandlers. Needs adaption later on

* Added a  test case for the RestDocumentHandler lane decission, synchronous replications should be fast-lane.

* Added CHANGELOG entry

* Applied review fixes

* Update CHANGELOG

Thanks for finding!

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>

* Test with absurd timeout

* Removed debug timeout
2019-07-10 17:30:31 +03:00
Jan 25bc8c5343 remove bogus warnings about statistics thread (#9446) 2019-07-10 14:12:11 +03:00
Tobias Gödderz 789ef28a59 Bug fix/fix snippet responsibility for views (#9416)
* Fix query snippet responsibility for views

* Select one snippet per node id, instead of parent query id
2019-07-09 16:21:43 +03:00
Jan c52f2a8315
refactoring (#9411) 2019-07-09 11:15:52 +02:00
Andrey Abramov 420326be25
Bug fix/internal issue #414 (#9428)
* add more tests

* and more...

* address msvc build issue
2019-07-08 23:17:41 +03:00
Jan 1d15b50d22
Bug fix/applicationserver stop (#9414) 2019-07-08 20:30:05 +02:00
Jan 66d8c01ad6
Bug fix/fixes 08 07 2019 (#9423) 2019-07-08 20:29:29 +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
Tobias Gödderz f501e00e9d Bug fix/add shard id to replication client identifier (#9366) 2019-07-08 14:03:42 +02:00
Andrey Abramov 174b54b036
Bug fix/internal issue #605 (#9421)
* release tick before committing changes to arangosearch

* fix tests

* address review comments

* address review comments

* add comment
2019-07-08 14:07:11 +03:00
Dronplane 22d5df16e8 Bug fix/internal issue #606 (#9413)
* Fixed stem, norm, text analyzer creation without properties. Added tests.

* Removed non-determenistic test. Same functionality is tested by gtest (IResearchAnalyzerFeatureTest.test_remove)

* Added check for analyzer type existence.

* Made error messages for analyzer creation more specific and readable

* Fixed test

* Applied review suggestions
2019-07-08 13:11:22 +03:00
Max Neunhöffer 7aa0c19026
Leader updates Current precondition fixes. (#9410)
* Better logging and error reporting.
* Preconditions for FollowerInfo.
* Preconditions when updating Current as leader.
* Change a log level.
* Fix unit tests.
* CHANGELOG.
* LOG_TOPIC ids.
* Fix a log id.
* Fix Windows compilation.
2019-07-05 13:35:13 +02:00
Andrey Abramov 595728ec1b
Bug fix/internal issue #605 (#9405)
* fix recovery

* update iresearch

* more fixes

* address review comments
2019-07-05 13:14:37 +03:00
Dronplane b70d7372ef Bug fix/internal issue #586 (#9401)
* Removet lazy creation ob analyzers collection. Test fixes (added explicit creation of analyzers collection for test enviroments)

* Fixed test runs. Removed cluster tests for analyzer DDL

* Analyzers collection name moved to tests common

* Disbaled load_library in normalize calls

* Legacy code cleanup

* added db analyzers collection checks in analyzer creation test to cover functions removed from gtest

* Reverted analyzer properties comparsion to non-utf8 as that must be binary equal
2019-07-04 13:12:06 +03:00
Simon b3ffaff86c Pregel additional test & TSan error fix (#9357) 2019-07-04 09:36:40 +02:00
Simon 9eaeb6ce37 use a lock when calling unload (#9375) 2019-07-04 09:36:19 +02:00
Jan 801c957348
add initializeCursor back to DistinctCollectExecutor (#9386) 2019-07-03 16:15:15 +02:00
Lars Maier c4ff5ccce9 [Devel] Queue-Full-Logging (#9388) 2019-07-03 13:07:24 +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 727bb39f1a
fix JSON statistics (#9385) 2019-07-02 18:24:04 +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
jsteemann b175853bae fix invalid logId 2019-07-02 16:48:06 +02:00
Jan be052fb614
use index projections when range-scanning the primary index and filtering on _key (#9372) 2019-07-02 11:26:27 +02:00
Dronplane 1f8099e295 Bug fix/fix cluster tests for analyzers (#9370)
* Fixed analyzer definition in test (definition should be object). Fixed proper reporting of invalid parameter error.

* Restored ability to parse string-encoded json object in analyzers rest hadler. Test was reverted to pass string again.

* Fixed test run

* Get rid of shared ptr to simplify code.
2019-07-01 16:52:06 +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
Jan fe19b8aaae
don't unfairly favor the edge index when comparing it to more specialized indexes on `_from`/`_to` plus other attributes (#9362) 2019-07-01 16:32:42 +02:00
Andrey Abramov 671380b8fb
bug-fix/internal-issue-#604 (#9353)
* ensure flush subscriptions are being unsubscribed

* update tick even if no changes happened

* remove debug output

* fix test

* address review comments

* address test failures
2019-07-01 16:00:14 +02:00
Lars Maier c215e30299 Precs to check if collection exists (#9278)
* Adding preconditions for jobs to check that the collection still exists.

* Make it compile.

* Fixed tests.
2019-07-01 13:24:53 +02:00
Wilfried Goesgens 0afe3ddb5a Trap whether the statistics-Thread is asleep for too long. (#9364) 2019-07-01 11:32:31 +02:00
Jan d842b877a2
actually honor the return value of FollowerInfo::addFollower (#9358) 2019-06-28 18:31:15 +02:00
Jan 1653e9698a
remove unused functionality (#9360) 2019-06-28 18:28:11 +02:00
Dronplane d561221201 Bug fix/fixed analyzer removal from db (#9359)
* Added missing commit. Updated tests to check actual deletion from db.

* Added check for commit result
2019-06-28 17:29:49 +02:00
Jan 64c8079186
Forbid indexes on _id (#9337) 2019-06-28 11:11:22 +02:00
Andrey Abramov 40cce2cee0
bug-fix/internal-issue-#565.1 (#9257)
* validate analyzer properties, do not return `null` for identity analyzer properties

* fix some tests

* Fixed tests for new analyzer parameters validation. Added explicit test for analyzer parameter validation

* update iresearch, fix analyzer tests

* fix more tests

* fix tests

* store analyzer properties as vpack

* more compilation fixes

* Updated iresearch

* Tests compilation fixed

* Test run fixes

* Test run fixes

* Fix test run

* Fixed all IresearchTests

* Fixed V8Analyzers tests

* Added ngram and delimeter analyzers vpack config

* Added ngram and stem analyzers vpack parsers. Added tests

* Fixed internal issue #593 Fixed build issue

* Fixed tests

* Fixed Gtest tests

* Changed test run to fix Mac failure

* Mac tests debugging

* Fixed jslint errors

* test tracing added

* Taken account for VPackSlice operator== false negatives
2019-06-28 10:49:01 +02:00
Lars Maier eb1aa6e024 Response compression (#9300)
* First draft of response compression.

* Cleanup.

* Removed compression from /_api/version.

* Added ruby test for response compression.
2019-06-28 10:02:48 +02:00
Max Neunhöffer d6d362bd3b
Fix agency election lock step bug. (#9351)
* Fix agency election lockstep bug.

Reset the base point for the random election timeout to now whenever we have
cast a vote, be it for us or for some other server.

* CHANGELOG.

* Fix compilation.
2019-06-27 22:06:26 +02:00
Jan 161ce9607d
added test for object creation (#9355) 2019-06-27 21:13:03 +02:00