1
0
Fork 0
Commit Graph

1158 Commits

Author SHA1 Message Date
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
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
Wilfried Goesgens 828e41601e Bug fix/implement windows maintenance tests (#9763) 2019-08-21 12:42:29 +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 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 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
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
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
Jan b6d1058eb0
fix a leak in hotbackup tests (#9715) 2019-08-15 12:24:20 +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
Simon 9d125ef5cb Add support for WGS84 on distances (#9672) 2019-08-12 13:05:56 +02:00
Wilfried Goesgens 1cad241289 add logging if the body isn't valid json (#9678) 2019-08-12 12:18:00 +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
Wilfried Goesgens acac959cb1 add a way to output the version in the tests (#9673) 2019-08-09 11:55:43 +02:00
Dan Larkin-York 4347f1abec Add missing includes for Windows builds. (#9657) 2019-08-08 13:03:37 +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
Dan Larkin-York 3d0246cb18 Decentralize includes (#9623) 2019-08-06 15:32:09 +02:00
Wilfried Goesgens 3a98726a95 add error to failure (#9637) 2019-08-05 14:17:02 +02:00
Jan 7c98893c73
reduce wait timeouts as a mitigation for notifying waiters without holding the required mutex (#9618) 2019-08-02 15:44:38 +02:00
Jan d05d305511
attempt to fix load_balancing tests in slow test environments (#9625) 2019-08-02 14:18:31 +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
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
jsteemann a2fc0f8f17 emit a bit more context when certain failure occurs next time 2019-07-29 15:53:37 +02:00
jsteemann a723c21db1 try to fix mmfiles test 2019-07-29 15:00:24 +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 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
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
Andrey Abramov 2f3c12eccb
fix asan issue (#9540) 2019-07-22 19:19:31 +03: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
Tobias Gödderz 7e98f56cf5 Bug fix/clean replication api wal tracking (#9473) 2019-07-19 15:44:14 +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 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
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
Wilfried Goesgens 2da0fb356d Feature/cleanup j client api (#9457) 2019-07-19 09:23:24 +02:00
Simon e5507d840f Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02: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
Dronplane 468a334894 Enabled and fixed disabled tests in ArangoSearch (#9450) 2019-07-10 18:19:09 +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
Wilfried Goesgens 0ad76a8185 fix location - while they work with the server these tests are run in arangosh so they need to be in client/ (#9435)
* fix location - while they work with the server these tests are run in arangosh so they need to be in client/

* rename testsuite

* rename file as its testsuite

* Rename permissions_server to server_permissions
2019-07-10 16:49:12 +03:00
KVS85 8897cd8f31 Fix wrong ars test failure suppression 2019-07-10 15:08:53 +02:00
Andrey Abramov b3690fc24f
bug-fix/internal-issue-#595 (#9440)
* address ASAN failures in tests

* Add --isAsan for testing.js

* Fix typo
2019-07-10 01:11:22 +03:00
KVS85 e4d76e087f
Temporarily suppress failure (#9443) 2019-07-10 01:10:56 +03:00
Dronplane 3330d9bb0f Bug fix/internal issue #524 (#9436)
* Added test for inBackground arangosearch link creation

* Updated flag for index check

* Reformatted  too long line

* Fixed comment

* Fixed test run on server-side

* fixed jslint issue

* Added task unregistering in teardown

* Made transaction sync with filesystem
2019-07-10 01:06:25 +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
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
Wilfried Goesgens 3599aedda1 Don't wait eternaly; don't unload collections with rocksdb (#9415) 2019-07-05 17:13:24 +02:00
Jan Christoph Uhde e605c9cd2e add test for oasis statistics (#9412) 2019-07-05 16:11:25 +02: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
Jan Christoph Uhde 54169cd44f fix cluster-statistics (#9397) 2019-07-05 10:32:46 +02:00
Wilfried Goesgens f9c93c23b1 relax test condition for windows (#9393) 2019-07-04 14:19:24 +02: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
Jan 7ffb0684cd fix tests that didn't properly use env variable to look for test (#9399)
resource files
2019-07-04 11:30:48 +02:00
Simon b3ffaff86c Pregel additional test & TSan error fix (#9357) 2019-07-04 09:36:40 +02:00
Jan 1a58cc2213
add VelocyPackHelper::equal method (#9389) 2019-07-03 12:15:11 +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
KVS85 75d7687417 Fix interferention of bob user in test 2019-07-02 12:47:19 +02:00
KVS85 38d714087b
Fix authentication and catch tests in devel (#9374)
* Fixed LDAP authentication issue

* Fixed undefined _system db id in storage engine mock

* Fix auth-analyzer.js to work with LDAP

* Fixed mac warning
2019-07-02 10:11:10 +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
Jan d842b877a2
actually honor the return value of FollowerInfo::addFollower (#9358) 2019-06-28 18:31:15 +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 Christoph Uhde 782cb49105 Feature: Analyzer REST-API Tests (#9091)
* add analyser http API tests

* add more tests

* add tests and lint

* remove print

* add another test

* fix formattig

* add e6 expresseion as key in object

* WIP: add analyzer permissions test

* fix test

* lint

* WIP: try to add analyzer auth-test

* add sleepBeforeStart option

* use basic auth

* fix tests

* change test so it would work if the api was as expected

* fix authentication test

* fit shell client analyzer test

* fix shell-analyzer-rest-api.js

* fix auth-analyzer.js

* fix user-access-right-update-view-arangosearch.js

* remove print statements

* Fixed analyzer parameters for test
2019-06-28 16:21:09 +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
Jan 161ce9607d
added test for object creation (#9355) 2019-06-27 21:13:03 +02:00
Jan 32ce797be4
make it possible to limit the number of parallel WAL tailing invocations (#9344) 2019-06-27 18:43:53 +02:00
Jan 6f0c116130
clean up usage costs (#9237) 2019-06-26 17:01:22 +02:00
Andrey Abramov 33ce94379f
bug-fix/internal-issue-#597 (#9324)
* ensure immutable properties of ArangoSearch are properly handled in cluster

* address jslint warnings
2019-06-25 17:15:07 +02:00
Simon cf7cf0131b Try to fix corruption error (#9258) 2019-06-25 10:18:26 +02:00
jsteemann 086c4e7b82 fix tests 2019-06-25 09:44:01 +02:00
Tobias Gödderz f4baf0c436 Specialize scheduler pointer to allow devirtualization of method calls (#9225) 2019-06-21 11:15:18 +02:00
Wilfried Goesgens 42e3dcf5a1 Bug fix/wintendo compile sequence (#9295)
* move snappy up

* Fix compile warning with MSVC (#9291)

* one more warning

* use right type

* only define variable if we actually use it in the code

* only define variable if we actually use it in the code undo

* use right type
2019-06-19 12:00:48 +02:00
Dronplane 89aa67dcf4 Updated names for text and norm analyzer parameters. Added tests for new parameter names. (#9287) 2019-06-19 09:28:46 +02:00
Tobias Gödderz c854d04864 Feature/limit executor passthrough (#9162)
* Some refactoring to implement helper methods iff necessary

* Updated comments

* Added static assertions

* Re-enabled check for maintainer mode

* Allow pass-through for LimitExecutor. This is not yet working with fullCount correctly!

* Get fullCount before returning the last row

* Adapted fullCount tests: LimitExecutor doesn't lie about the state of the last row anymore

* Use correct row

* Handle LimitExecutor-stats during fetchBlockForPassthrough

* Fixed LimitExecutorTest

* Removed _stats member

* Added more catch tests

* Bugfix for fullStats

* Removed an erroneous assertion

* Implemented LimitExecutor::skipRows

* Avoid name clash of class enum member to please MSVC

* Test MSVC

* Revert "Test MSVC"

This reverts commit d8325d95318bb83b79c8c4cc9f886d36e484c870.

* CREATE_NEW seems to be taken, too. Next try for MSVC

* Built VPack to ItemBlock helpers, and made SingleRowFetcherHelper more general

* Removed ostream operator because MSVC doesn't like it...

* Implemented SingleRowFetcherHelper::fetchBlockForPassthrough, plus a small framework to test executors

* Removed erroneous include

* Moved code in separate files

* Began writing the extended schema of runExecutor

* Added output operator for ExecutorCall

* Fixed removeWaiting

* Fixed expected output

* Added skipRows to runExecutor

* Added two tests

* Allow empty blocks

* Added two more tests

* Added another test

* Built two different parametrized classes for LimitExecutor

* Some cleanup

* Even more tests

* Fixed a bug found by the new tests

* Fix compile error on windows

* Use native matrix representation in tests

* Updated some comments
2019-06-18 17:33:58 +02:00
Wilfried Goesgens eadcedaa5e Bug fix/specify snappy dependency (#9289) 2019-06-18 17:33:23 +02:00
Wilfried Goesgens 200be8ec8b Bug fix/zero mac clang warning to errors (#9279) 2019-06-18 10:28:30 +02:00
Wilfried Goesgens 6fd3dd024c windows warning as errors, masquerade remaining unfixeable errors (#9249) 2019-06-17 16:21:29 +02:00
Wilfried Goesgens a866f8c6fd update gtest, use json output for reporting (#9193) 2019-06-17 13:46:40 +02:00
KVS85 c2bdf80532 Greylist resilience-synchronous-repl-with-arangosearch-view-cluster.js 2019-06-14 15:08:12 +02:00
Markus Pfeiffer a793f72448 Move roundCost function to utilities (#9247) 2019-06-12 16:02:09 +02:00
Heiko 56c969316f Bug fix/gharial edge from and tos verification (#9177)
* prepared new functions for more precise edge verification

* added tests

* more testing

* validate function added to replace edge functionality

* changelog

* applied requested mchackis refactor wishes

* adjustments for update and replace edge validation

* ruby testing adjustments due more prices update and replace edge verification mechanisms

* used wrong flag for the replacement of an edge process

* adjusted last failing tests

* rm print

* added edge to edge tests
2019-06-12 15:12:50 +02:00
Alan Plum a6b49e3a7e Bug fix/buffer redux (#9229)
* Add failing tests

* Add tests for Buffer#slice

* Add tests for Buffer#new

* Skip failing tests

* Implement changes

* Unskip failing tests

This reverts commit 9f8a34bd74e152b7b3158fea79b12e6da8343001.

* Fix implementation

* Remove meaningless test

This test only succeeded because of a broken implementation of the Buffer constructor. It doesn't really do anything useful.

* Add note to CHANGELOG
2019-06-12 15:00:43 +02:00
Andrey Abramov 384c4310b1
Bug fix/internal issue #589 (#9244)
* update iresearch from upstream

* adjust tfidf/bm25 to original behaviour

* update iresearch from upstream

* fix compilation issues

* reduce number of virtual calls

* upgrade iresearch from upstream

* add js test
2019-06-11 17:42:30 +03:00
Dan Larkin-York 938e5fd36c Add drop-check for index creation in cluster (#9219)
* Add drop-check for index creation in cluster.

* Move check from callback to regular read.

* Add changelog entry.

* Incorporate review suggestion

Co-Authored-By: Simon <simon@graetzer.org>

* Convert to VPackArrayIterator.
2019-06-10 10:11:17 +02:00
Jan 59d84e8301 attempt to remove expired WAL files on agents (#9231) 2019-06-09 19:46:45 +02:00
Jan 091abbec77 don't make RocksDB startup fail with 0-byte log files (#9208) 2019-06-07 15:13:56 +02:00
Jan Christoph Uhde 3f603f024f remove some containers from common.h (#9223)
* remove some containers from Common.h

* enterprise fixes
2019-06-07 13:27:24 +02:00
Frank Celler 6b16d1c0a5 Revert "Fix Buffer methods (#9070)"
This reverts commit 6c96e5dd24.
2019-06-07 10:18:58 +02:00
Wilfried Goesgens 863257f1d5 fix windows warnings / compile errors (#9215) 2019-06-06 18:08:44 +02:00
Kaveh Vahedipour 8a511934df [devel] fix ttl handling for object assigments (#9207)
* fix ttl handling for object assigments
* completed test handling
* CHANGELOG.
2019-06-06 15:48:40 +02:00
Jan 074397d367
allow "stream" attribute on top level (#9195) 2019-06-05 15:48:58 +02:00
Jan Christoph Uhde 12ec86c2b1 add shardKeyAttribute to pregel start parameters (#9149) 2019-06-05 14:25:47 +02:00
Michael Hackstein 8a4d0bc068
Performance improvement on Sort (#9198)
* Modified AqlItemMatrix to use two uint32 values to identify for in Block instead of one uint64 value encoding the two and calculation. Also now throw an error as soon as we exceed the limit there

* Removed new error code, thanks jsteemann for pointing out.
2019-06-05 12:45:17 +02:00
jsteemann c87e15a048 attempt to fix a test assertion failure 2019-06-05 11:42:46 +02:00
jsteemann 0359a0acda fixed jslint warning 2019-06-05 10:56:53 +02:00
Jan Christoph Uhde 7ac857784f add endpoint check to reconnect (#9196) 2019-06-05 10:53:57 +02:00
Andrey Abramov 0fb8b348db
bug-fix/internal-issue-#574 (#8991)
* restrict number of buckets to compare

* do not use more sort buckets than requested

* cleanup
2019-06-04 18:55:25 +03:00
Jan c978d1a9df
fix handling of comments in config files (#9172) 2019-06-04 14:46:25 +02:00
Andrey Abramov b2a2bd100e
Bug fix/internal issue #590 (#9176)
* disallow creation of analyzer by a full name

* fix tests
2019-06-04 00:28:20 +03:00
Dronplane 1e24c79ca3 Bug fix/internal issue #565 (#9154)
* Merged latest iresearch. Removed creation of build-in analyzers from tests

* Updated tests for new analyzer parameter names

* Merged fix for format from iresearch

* Apply suggestions from code review. Corrected typo in variable name.

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

* backport changes from IResearch upstream

* fix compilation issues

* backport fix from IResarch upstream

* Fixed analyzer parameter name in tests
2019-06-03 18:20:23 +03:00
Michael Hackstein d135d55d55
Bug fix/collection babies (#9124)
* Bug fix 3.4/collection babies (#9033)

* Prepare API to create multiple collections in a single request to ClusterMethods to improve speedup

* Added counter on how many collections are successfully created

* Allow multi collection creation one level higher

* CollectionMethods now allow batch createion of Collections

* Improved array size assertions

* Now a graph is createad within a single roundtrip in the agency.

* Added new header files

* Insert collections in the AGENCY with TTL and a isBuilding flag, collections with this flag should not be visisible in the coordinator

* Added forgotten C++ file

* Fixed a rare race condition, and the failing IResearch Tests

* readded callback on DONE, otherwise lists are out of sync

* Fixed assertions to let mocked tests pass...

* Fixed community cluster

* Started fixing IResearch analyzer test, catch-tests are failing ;(

* Solved missed merge-conflict

* Added helper functions in AnalyzerFeature-test

* Refactoring AnalyzerTest Section-Auth

* Refactoring AnalyzerTest Section-Emplace-Duplicates

* Refactoring AnalyzerTest Section-Emplace-Error-Cases. Recovery-Test is now red, it seemed to be green because of invalid test case before.

* Refactoring AnalyzerTest, split GET test into multiple parts, still left 'cluster simulation'.

* Attempt to extract Coordinator / DBServer tests a little bit. This commit starts to break all Coordinator tests. However i am convinced that earlier version did NOT test a cluster situation at all, but some hybrid of SingleServer with full local storage that got told to be a Coordinator from now on, but without any Coordinator setup...

* Temporarly disabled some tests in AnalyzerFeature, as discussed with @gnusi.

* Fixed include guard.

* Temporarily deactivated failing tests

* You shall save your files before you commit...

* Fixed test asserting on plan version, which is now higher than before
2019-06-03 17:11:22 +02:00
Alan Plum 6c96e5dd24 Fix Buffer methods (#9070)
* Add failing tests

* Implement changes

* Add note to CHANGELOG

* Fix test failure
2019-06-03 17:07:52 +02:00
Jan e14b9aaaa1
fix dirname behavior (#9167) 2019-06-03 15:26:38 +02:00
Max Neunhöffer 06054dfb64
Fix yet another agency test with clientid. (#9150) 2019-05-31 17:23:42 +02:00
Dan Larkin-York 44a413a9af Miscellaneous fixes for named indices (#9100) 2019-05-31 17:00:56 +02:00
Tobias Gödderz 6a56130ff8 Reimplement ReturnExecutor with a simple pass-through (#8876) 2019-05-31 15:27:59 +02:00
Tobias Gödderz 79cd45f89c Wait for replication before inserting documents (#9151)
* Wait for replication before inserting documents

Also, increased some timeouts and fixed a log message

* Fixed some log levels and a log message

* Removed repair-distribute-shards-like-spec from greylisted tests
2019-05-31 16:09:20 +03:00
Jan 3364ea6273
refactor index APIs (#9145) 2019-05-31 11:12:39 +02:00
Andrey Abramov e8b38bfa8e
bug-fix/internal-issue-#549 (#9086)
* do not persist legacy analyzers into _analyzers table

* fix arangosearch upgrade in cluster

* get rid of Vasiliy's shit

* address review comments

* ensure link is synchronized after creation in upgrade

* fix compilation error

* minor cleanup

* fix tests

* distribute '_analyzers' collection as '_graphs'

* comment out Vasiliy's shit part 2
2019-05-30 22:00:06 +03:00
Tobias Gödderz 90abe3ba93 Increased timeouts, added a little more helpful error messages for assertions (#9135) 2019-05-30 04:30:39 +02:00
Wilfried Goesgens ec0cc82bf6 test files and their content were swapped (#9136) 2019-05-30 04:29:37 +02:00
Kaveh Vahedipour 773f3c8422 [devel] fix state clientlookuptable (#9066) 2019-05-30 04:24:46 +02:00
Jan d67513607d
fixed issue #9106 (#9116) 2019-05-29 18:27:38 +02:00
Markus Pfeiffer de9ef00896 Round estimatedCost in some tests (#9126)
Otherise slightly different floating point results in estimatedCosts cause
tests to fail.
2019-05-29 15:29:52 +02:00
Simon a5a72ef6d4 port Pregel segmented buffers (#9112) 2019-05-28 18:23:20 +02:00
Jan 40ccafbded
Feature/rocksdb 6.2 (#9095) 2019-05-28 14:26:27 +02:00
Jan 033f411420
Bug fix/issues 27052019 (#9117) 2019-05-28 12:08:25 +02:00
Simon 27112a3486 Bug fix/jobs indexes (#9107) 2019-05-28 09:38:14 +02:00
Tobias Gödderz 5da9fcb0ce Bugfix of DFS path uniqueness implementation (#9041)
* Began work on generic traversal testing framework

* Translate shard ids to smart attributes

* Minor fixes

* Added a TODO note

* fixed tests

* cleanup

* first tests inside new traversal framework working

* added single server diamond tests

* Enable sharding in aql-graph-traversal-generic-graphs.js

* Tried to fix smart sharding

* Fixed smart graph name clashes, some cleanup

* Added meta tests

* Added TODO note

* Fixed single server

* Added a BFS order check

* Renamed test

* added more dfs and bfs tests for the openDiamond graph

* Added new graph "largeBinTree"

* Fix Map usage

* added smallCircle graph, added three dfs tests

* added smallCircle graph, added three dfs tests

* more smallCircle dfs tests

* Fixed largeBinTree shardings, and long graph names

* Fix long suffixes

* Provided names for shardings

* Added a log message

* more bfs smallCircle tests

* more bfs smallCircle tests - global

* smallCircle picture

* added completeGraph to graph test suite

* added more dfs tests for the complete graph up to depth 3

* Removed duplicate function definitions

* added depth 2 dfs complete graph test, added missing test to the exports

* Added test for largeBinTree

* added three path graphs, easy, advanced and more advanced

* Added a working check for bfs with global uniqueness

* Fixed usage of bfs checks

* Fixed expected input for two tests

* Added some static assertions to largeBinTree

* Oops

* added more advancedPath dfs tests

* better formatting of the visual graph

* more dfs advanced graph tests

* Implemented all easy path test combinations

* Fixed testAqlGraphQuery

* Fix in bfs check error reports

* Removed duplicate test

* Added advancedPath BFS tests

* Updated comments

* Fixed new tests

* Fixed graph description

* added more complete graph bfs tests

* added more complete graph bfs tests

* added testCompleteGraphBfsUniqueEdgesNoneD1 and testCompleteGraphBfsUniqueEdgesNoneD2

* added testCompleteGraphBfsUniqueVerticesUniqueEdgesPathD3 test

* added a few more complete graph bfs checks

* Extended a comment
2019-05-27 12:57:02 +02:00
Dronplane 3d697d8584 Added filtering analyzers before adding them to view link - duplica… (#9094)
* Added filtering analyzers before adding them to view link   - duplicates are not allowed any more

* Updated test testAddDuplicateAnalyzers - now it tests analyzers with same names but in different databases
2019-05-27 13:20:51 +03:00
Dan Larkin-York c3f03bc27d Fix two nondeterministically failing cache tests. (#9101) 2019-05-27 11:44:59 +02:00
KVS85 8d1885d0cb Bug fix/greylist timecritical and nondeterministic (#9047)
* Mark all timecritical and nondeterministic as greylisted

* Mark description to Greylist.txt

* Fix typo
2019-05-24 11:52:15 +02:00
Andrey Abramov f5a14414e1 Bug fix/disable upgrade for views again 2 (#9084)
* temporary disable upgrade for views

* temporary comment out test for upgrade
2019-05-23 15:31:26 +02:00
Tobias Gödderz f1dd0659fa Fixed test usage of MultiDependencySingleRowFetcher (#9060)
* Fixed assertion to not have side effects

* init dependencies in test explicitly
2019-05-22 09:39:50 +02:00
Jan de717924ac
fix crash (#9057) 2019-05-21 18:19:11 +02:00
Jan 6cea7528fb
fix result of AQL function `MIN` in case the first input element is (#9053)
`null`
2019-05-21 15:43:33 +02:00
Alan Plum e8b7e1860a Bug fix/unbreak foxx security (#9042)
* Unbreak aardvark when --foxx.api false

The easiest way to disable the aardvark foxx routes is to just skip the
import and mount altogether. The previous approach caused the service to
throw an error because the module doesn't actually export anything.
There's no need to prevent the export if we just don't import the module
to begin with.

* Add an error code for service api disabled

* Throw an actual error when accessing Foxx API routes

* Throw an error when using legacy Foxx API

There's no easy way to use a catch-all here so disable them one by one. No new routes will be added to this API and it'll go away in 4.0 so there's no risk of forgetting to add the throw-check in new routes.

* Render subnav without delay

The subnav doesn't need the perm check results but we need the subnav to exist so we can populate it in other parts of the app. This fixes the subnav not showing up when reloading certain views (e.g. install service via upload).

* Hide ONLY the Foxx store when it is disabled

We still want to allow installing and upgrading/replacing services. We just don't want to show the store.

* Hide Foxx services in frontend if Foxx API is disabled

* Build aardvark

* fixed typo in disable check, fixed tests
2019-05-21 14:45:23 +02:00
jsteemann fe6727b7d0 remove compile instruction specific for CATCH tests 2019-05-21 10:18:54 +02:00
Dan Larkin-York d5ecdd143a Convert unit tests to googletest framework (#9034) 2019-05-21 09:17:46 +02:00
jsteemann c640e07ada next attempt for fixing unreliable test 2019-05-20 11:45:25 +02:00
Lars Maier 4fc2790863 [devel] Direct Exec Scheduler (#9004) 2019-05-20 11:38:57 +02:00
Andrey Abramov 56696e3ea6 Bug fix/internal issue #577 (#9035)
* properly handle shorthand of system analyzer

* don't allow accessing local analyzer from within another database

* ensure local analyzer are not acessible from outside

* fix duplicate ids
2019-05-19 18:00:13 +02:00
Frank Celler 0bb8ec2e06 Revert "test is broken"
This reverts commit 469b94235b.
2019-05-18 09:55:01 +02:00
Frank Celler de566b405d Revert "fixed typo in disable check, fixed tests"
This reverts commit 068bbc9143.
2019-05-18 09:54:49 +02:00
Frank Celler 068bbc9143 fixed typo in disable check, fixed tests 2019-05-18 09:42:11 +02:00
Frank Celler 469b94235b test is broken 2019-05-18 08:04:49 +02:00
Jan Christoph Uhde d194cfc31e bug-fix/iresearch-error-propagation (#9001)
* use result instead of bool

* WIP: use arangodb::Results in more places

* WIP: fix unittests

* fix tests
2019-05-17 19:00:29 +03:00
Markus Pfeiffer c1d6a88da2 Fix a crash in ShortestPathExecutor (#8985)
* Fix a crash in ShortestPathExecutor

* Add a test that checks whether ShortestPathFinder is passed valid inputs
2019-05-17 16:40:22 +02:00
Simon 93b2e64f37 Port pregel fixes (#9022) 2019-05-17 16:32:58 +02:00
Jan Christoph Uhde 970f732dec add exceptions for tokens function. (#8984)
* Provide users of the TOKENS function with errors.

* remove newlines

* fix compare

* fix as asked for

* improve fix
2019-05-16 22:12:43 +03:00
Tobias Gödderz c9fa5fba11 Additional AQL skipSome tests for IndexExecutor (#8938)
* Began work on additional index skipSome tests

* Added more index skip tests
2019-05-16 11:30:24 +02:00
Andrey Abramov b7cfa24518
bug-fix/arangosearch-upgrade (#9010)
* fix upgrade

* fix catch tests

* Update arangod/IResearch/IResearchAnalyzerFeature.cpp

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

* Update arangod/IResearch/IResearchAnalyzerFeature.cpp

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>
2019-05-16 10:38:39 +03:00
Jan 0ea4d35a17
fix failing test (#9006) 2019-05-15 22:58:14 +02:00
Andrey Abramov bdc2c7cdc4
fix asan error (#9005) 2019-05-15 17:16:30 +03:00
Wilfried Goesgens 1907a7211b Bug fix/cleanup system includes (#8962) 2019-05-15 15:12:59 +02:00
KVS85 d727cc7f9b Greylist tests/js/server/recovery/write-throttling-mmfiles.js 2019-05-15 12:27:04 +02:00
Tobias Gödderz 82f5978f30 Bugfix: Do not call getSome on remote after DONE (#8978)
* Bugfix: Do not call getSome on remote after DONE

* Added profiler tests for Sorting- and UnsortingGather

* Fixed jslint error
2019-05-15 09:13:44 +02:00
Simon 1923d315e8 New tests for Transaction API (#8996) 2019-05-14 21:40:31 +02:00
Lars Maier 49c568e674 Added reason to job abort method. (#8877) 2019-05-14 15:39:53 +02:00
Wilfried Goesgens e36655dee7 Feature/have collection count type (#8942) 2019-05-14 13:19:09 +02:00
Vasiliy 12bd4c785b issue 555.1.1: issue 555.1.1: try loading previous data store snapshots if checkpoint file unavailable, ehnace error message, address some warnings (#8975) 2019-05-13 18:33:44 +03:00
Andrey Abramov 404bcc8b0c
switch to tiered consolidation by default (#8981)
* switch to tiered consolidation by default

* fix copy/paste error

* fix tests

* fix tests
2019-05-13 18:25:46 +03:00
Andrey Abramov 4e12fdb30b
ArangoSearch sorted indexes (#8888)
* move IResearchViewSort into separate unit

* ensure sort is propagated to IResearchLink

* update iresearch and extend some tests

* implement insertion of sorted values, store value comparator in link

* add tests for VPackComparer

* minor cleanup

* fix issue with sort definiton propagation

* propagate error message from index factory

* add integration tests for sorted indexes, single server

* initial implementation of IResearchViewMergeExecutor

* move iresearch::VPackComparer to separate translation unit

* store collection in IndexReadBuffer for IResearchViewMergeExecutor

* set primary sort from optimizer rule

* add some tests for sorted view case

* extend IResearchViewNode tests

* simplify primary sort definition

* pretty print order condition covered by arangosearch in query explanation

* fix compilation with g++-8

* address catch test failures

* fix tests

* adjust arangosearch optimizer rule to optimize sort in case of cluster

* make tests for sorted indexes work in cluster too

* fix tests

* extend js tests for sorted indices

* fix keyword in query explainer

* ensure sort-limit rule works with views

* backport ngram analyzer fix from upstream

* address jslint errors

* modify IResearchViewSort to support boolean direction specification format

* add some tests

* add tests

* add skip functionality

* extend tests

* add more catch tests

* inline some methods

* address jslint errors

* extend catch tests to reproduce the failure

* add some tests for check fullcount

* add more tests

* extend tests

* temporarily comment out broken tests

* extend js tests

* address review comments

* address jslint errors

* update iresearch
2019-05-11 17:58:56 +03:00
Vasiliy 9f1340eeeb issue 563.1: include static analyzers in analyzer listing (#8925)
* issue 563.1: include static analyzers in analyzer listing

* address macos test failures
2019-05-11 14:52:48 +03:00
Simon 6075fec35e Forward port some changes (#8949) 2019-05-09 19:42:06 +02:00
jsteemann 60a19e0ab3 fix jslint warning 2019-05-09 19:11:21 +02:00
Jan Christoph Uhde 192ecd2f75 add test for unicode paths (#8909) 2019-05-09 19:00:48 +02:00
Jan c1d48c0fef
honor index hints in optimizer rule (#8940) 2019-05-09 18:47:36 +02:00
KVS85 2a66b53591 Greylist tests/js/client/shell/shell-foxx-paths-spec.js 2019-05-08 17:44:19 +02:00
KVS85 7847e8e9d8 Small fix of test setUp 2019-05-08 15:54:36 +02:00
Heiko 58db1023f3 Feature/aql skip some (#8771)
* testing skipSome implementation, default and passThrough

* added simple implementation for default and passthrough skipsome methods

* added skipRows function to enumerate collection executor

* added tests for the enumerate collection skipRows function

* implemented and tested enumeratecollection skipSome

* skipSome tests

* fixed a test, prepared iresearch view exec for skipping

* rm logs

* gcc bug workaround

* changed to original test code as it has been before

* iresearch skipping, added ires skip test

* added index executor skipRows

* added skip blockfetcher, quick exit index

* test

* const dummy and singlerowfetcher skip

* forgot return value

* input wrong initialized

* trying to remove dynamic cast and solve with a different approach

* cleanup

* const skip

* jslint

* Handle skipSome of subqueries correctly

* Removed unused code

* Removed unused member

* Simplified skip variants and enabled IndexExecutor skipping

* A little cleanup, fixed DependencyProxy::skipSome

* Reverted test change

* Tried to make testLimitBlock3 clearer

* Extended test suite

* Bugfix

* Added stats when skipping and fixed a few other things

* Bugfixes

* Moar bugfixes

* Update arangod/Aql/IResearchViewExecutor.cpp

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

* Update arangod/Aql/IndexExecutor.cpp

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

* Update arangod/Aql/IndexExecutor.cpp

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

* applied requested changes

* Fixed a bug in LimitExecutor::expectedNumberOfRows()

* Fix skipSome in catch test RowFetcherHelper

* Fixed a bug in the tests

* Two bugfixes in LimitExecutor::expectedNumberOfRows

* Avoid passing large batch sizes from skipSome to getSome

* Fixed Windows compile errors

* Fixed a skip bug with WAITING in unsorting gather blocks

* Make aql-skipping find some cluster bugs, like the last commit

* Bugfix and additional asserts

* Fixed skipSome counting in IndexExecutor

* Resolved merge conflicts
2019-05-08 15:02:43 +02:00
Simon 0502a97abb forwardport changes from 3.4 (#8894) 2019-05-08 14:34:25 +02:00
jsteemann d50eeb0410 fix test 2019-05-08 10:24:54 +02:00
KVS85 068270fff9 Small speedup of setup in dump suite 2019-05-07 23:49:17 +02:00
Vasiliy 6a5785be40 issue 568.1: restrict analyzer name to characters allowed for collection names (#8923) 2019-05-07 16:10:00 +03:00
Jan Christoph Uhde f3a2eaf6d9 Bug fix/permission tests (#8890) 2019-05-07 15:07:59 +02:00
Heiko 4837c7b864 Bug fix/collect aggregate undefined (#8853)
* allow 3.4 behaviour regarding aggregate collect and undefined variable

* added test to check undefined var

* rm print

* remove duplicate doCopyRow

* wrongly removed due merge

* initialize _allowSourceRowUninitialized always as false as default

* try to fix another case

* added missing parenthesis

* optimized if, also added compiler hint
2019-05-07 15:05:49 +02:00
Jan 976dc2b726
Bug fix/issues 2019 05 06 (#8913) 2019-05-07 12:17:16 +02:00
Jan eed6729789
fix an issue, add tests (#8920) 2019-05-07 12:15:43 +02:00
jsteemann 8b245d25a4 remove print statement 2019-05-06 17:54:51 +02:00
KVS85 62d207edd2 Add debug print of installed service path 2019-05-06 16:50:27 +02:00
Simon d737c19302 address issues with active failover (#8908) 2019-05-06 15:52:49 +02:00
KVS85 9364f56594 Greylist tests/js/server/recovery/view-arangosearch-link-populate-no-flushthread.js 2019-05-06 14:33:32 +02:00
Jan fb85af85c6 auto-locate directory to IResearch test resources (#8899)
alternatively, pick up the directory from environment variable
`IRESEARCH_TEST_RESOURCE_DIR`
2019-05-05 03:03:23 +02:00
KVS85 0ef3056d65 Disable resilience_move_view test till it's reworked 2019-05-03 16:50:47 +02:00
Frank Celler 7c79e7359b greylisted view-arangosearch-link-populate-transaction-grey.js 2019-05-03 11:30:03 +02:00
Wilfried Goesgens 7c7f69d473 greylist view-arangosearch-link-populate-no-callbacks.js (#8885) 2019-05-02 15:07:52 +03:00
KVS85 5406cb7447 Add forgotten greylisted files 2019-04-30 22:18:48 +02:00
KVS85 ed14f3b650 Greylist tests/js/client/resilience/foxxmaster.js 2019-04-30 16:03:44 +02:00
KVS85 9f90a8347b Greylist tests/js/server/recovery/view-arangosearch-link-populate-transaction-no-flushthread.js 2019-04-30 16:01:00 +02:00
jsteemann ea1fc42c03 fix a test 2019-04-30 11:45:47 +02:00
Simon 1145c7c053 Improve estimator apply algo + test (#8871) 2019-04-29 17:08:14 +02:00
Markus Pfeiffer b979aa49da Improve path finder tests (#8849)
* Refactor ConstantWeightShortestPathFinder tests

 * Move the functions which are used both in ConstantWeightShortestPathFinder
   and KShortestPathsFinder into GraphTestTools
 * Don't display spurious error messages when there are multiple options
   for found paths anymore

* Use factored out code for Graph testing in KShortestPathsFinder
2019-04-29 08:53:40 +02:00
Simon 2f1cfa40e0 Fix tick overflow (#8840) 2019-04-26 11:07:04 +02:00
Tobias Gödderz 6dfb9995b4 Feature/aql by line cleanup (#8848)
* Removed useless parameters of buildCallback

* Renamed produceRow to produceRows and adapted a comment

* Renamed BlockFetcher to DependencyProxy

* Applied git-clang-format
2019-04-25 15:51:11 +02:00
Jan Christoph Uhde 677a79026c Foxx Security (#8845) 2019-04-25 09:56:29 +02:00
KVS85 e6b73726fd Remove several tests from greylisting 2019-04-24 21:38:49 +02:00
Vasiliy 934313846a issue 526.12: store analyzer definitions in a separate entry of the serialized link meta (#8832) 2019-04-24 12:15:20 +02:00
Vasiliy 83a26cb003 issue 546.1: do not load analyzers in cluster for non-user requests (#8822) 2019-04-23 16:01:01 +02:00
Vasiliy 80c508c296 issue 526.11.1: limit maximum analyzer properties size (#8830) 2019-04-23 14:14:21 +02:00
KVS85 3c972ef695 Fix db object visibility for ArangoSearch tests (#8819) 2019-04-23 09:31:29 +02:00
Markus Pfeiffer 1f2f5ec983 K_SHORTEST_PATHS queries only support one variable in FOR (#8784)
* K_SHORTEST_PATHS queries only support one variable in FOR

 * catch if the user gives more than one variable in grammar.y
 * also give a correct error message

* Test code that catches too many variables for K_SHORTEST_PATHS
2019-04-23 08:48:16 +02:00
Frank Celler 17fb0b795f removed print 2019-04-22 20:54:32 +02:00
Simon 569198a089 Abort el-cheapo transactions if servers fail (#8799) 2019-04-22 19:31:24 +02:00
KVS85 9027cb2418 Remove nondeterministic mark from 2 arangosearch recovery tests 2019-04-22 17:40:06 +02:00
KVS85 cad5f3cf2f
Actualize greylisted items
tests/js/common/aql/aql-view-arangosearch-cluster.js was splitted into tests/js/common/aql/aql-view-arangosearch-*-cluster.js
2019-04-22 18:30:49 +03:00
KVS85 31ac3deee7 Remove moving-shards-cluster.js from greylisting 2019-04-22 17:10:20 +02:00
KVS85 7dc2ea0535 Greylist more frequently failed tests 2019-04-22 16:48:06 +02:00
KVS85 6911ee47f4 Remove view-arangosearch-link-populate-transaction-no-flushthread from greylisting 2019-04-22 16:01:19 +02:00
Frank Celler 499e97c78b added missing result 2019-04-21 20:24:37 +02:00
Vasiliy 40ebdd0b58 issue 545.1.1: output short analyzer prefixes for user definitions (#8814) 2019-04-21 15:10:28 +02:00
Frank Celler ed83084d5a splitted aql-view-arangosearch 2019-04-21 13:04:27 +02:00
Vasiliy 0375218ca2 issue 541.1: fix incorrect test filename (#8810) 2019-04-20 23:19:23 +03:00
Vasiliy 016af62f5d issue 534.1: ensure proper destruction order (#8809) 2019-04-20 21:39:04 +03:00
KVS85 9cfaf511c8 Fix resilience_move location 2019-04-20 16:51:59 +02:00
Vasiliy 52aa8a9be4 issue 526.10.1: store 'forPersistence' link definitions in the agency, manually query for analyzer definitions across the cluster (#8797) 2019-04-19 16:24:02 +03:00
KVS85 878415ef8e Change resilience and replication testsuits layouts required for new tests and greylisting 2019-04-19 01:14:34 +02:00
Vasiliy cad86bcde0 issue 535.1: ensure recovery success if link recovery starts right at the previous marker (#8796)
* issue 535.1: ensure recovery success if link recovery starts right at the previous marker

* backport: initialize members

* backport: use string_ref instead if string copies
2019-04-19 02:00:49 +03:00
Alan Plum 8692f19e99 Handle extra args to db._query when using aql templates (#8789) 2019-04-18 10:50:46 +02:00
Markus Pfeiffer 8ab9ae96cd Fix memory leak in KShortestPaths testing code (#8777) 2019-04-17 15:11:37 +02:00
Markus Pfeiffer 304e8f861d Fix k Shortest Paths with weights, reactivate cluster tests (#8761)
* Make find in ShortestPathPriorityQueue const

* Fix k Shortest Paths with weights, reactivate cluster tests
2019-04-17 15:10:59 +02:00
Alan Plum 40aff3fdcd Upgrade JS deps (#8773)
* Make jsunity hash function avoid recursion

This guards against traversals of recursive data structures causing a stack overflow. This is crucial when using assertEqual with unknown inputs.

* Update deps

accepts: 1.3.4 -> 1.3.5
ansi_up: 2.0.2 -> 4.0.3
content-disposition: 0.5.2 -> 0.5.3
dedent: 0.6.0 -> 0.7.0
error-stack-parser: 1.3.6 -> 2.0.2
eslint: 2.13.1 -> 5.16.0
eslint-config-semistandard: 6.0.2 -> removed
eslint-config-standard: 5.3.1 -> removed
eslint-plugin-promise: 1.3.2 -> removed
eslint-plugin-standard: 1.3.2 -> removed
highlight.js: 9.12.0 -> 9.15.6
http-errors: 1.6.2 -> 1.7.2
iconv-lite: 0.4.19 -> 0.4.24
joi: 9.2.0 -> 14.3.1
joi-to-json-schema: 2.3.0 -> 4.0.1
js-yaml: 3.10.0 -> 3.13.1
marked: 0.3.9 -> 0.6.2
mime-types: 2.1.12 -> 2.1.22
mocha: 2.5.3 -> 6.1.3
qs: 6.5.1 -> 6.7.0
semver: 5.4.1 -> 6.0.0
statuses: 1.4.0 -> 1.5.0
timezone: 1.0.13 -> 1.0.22
type-is: 1.6.15 -> 1.6.16
underscore: 1.8.3 -> 1.9.1

* Inline eslint semistandard config

The eslint standard config has become extremely opinionated and incompatible with the existing coding style. This subset matches the existing coding style most closely. In the future we should migrate to an autoformatter like prettier and avoid this problem altogether.

* Linting

* Fix mocha runner

* New joi has additional property
2019-04-17 13:36:26 +02:00
Simon 5bb9d2dc17 transaction manager tests (#8759) 2019-04-16 21:26:40 +02:00
Vasiliy 1a22d1360c issue 526.9.1: implement swagger interface, add documentation (#8730)
* issue 526.9.1: implement swagger interface, add documentation

* address review comments

* add ngram

* Formatting

* Move REST description to new Analyzers top chapter in HTTP book

* Missed a DocuBlock

* Add Analyzers chapter to Manual SUMMARY.md

* Move REST API description back to Manual

Headlines were broken

* Add n-gram example
2019-04-16 18:54:30 +03:00
Jan 7c0c01c401
use the primary index when full-scanning a collection (#8548) 2019-04-16 16:50:03 +02:00
Michael Hackstein b3205dada8
USe smart-pointer in Priority Queue, it seems the usages have been correct everywhere (so no leaks) but memory responibility was hard to understand, should now be much simpler. (#8768) 2019-04-16 12:06:42 +02:00
Jan 357a0b3644 fix collection unload test (#8764) 2019-04-15 20:00:53 +03:00
Jan 1d175f446d
do not use the TTL index for queries which it does not support (#8766) 2019-04-15 18:55:19 +02:00
Markus Pfeiffer a14386267a k Shortest Paths (#8715)
* Add k-shortest-paths finder
2019-04-12 21:58:18 +02:00
Alan Plum b76f8adc0f Add SyntheticRequest#auth (#8750)
* Add SyntheticRequest#auth

* Fix tests
2019-04-12 21:18:35 +02:00
Alan Plum 3007c928aa Add collection.documentId method (#8749) 2019-04-12 19:53:01 +02:00