1
0
Fork 0
Commit Graph

3357 Commits

Author SHA1 Message Date
Iurii Popov 9f4926bfec Feature/issue #653 (#10427)
* late document materialization for view draft

* MaterializeType

* asserts and removed std::function

* std::map -> std::array

* Common search ast nodes code to a separate file

* Unit tests for create and clone a node

* js tests

* tmp unfinished

* Replace variables for late materialization

* Move removing

* Removed wrong clears

* Fixed variable replacement

* removed old tests (for separate materialization)

* check if late materialization arangosearch rule is enabled

* js test. added space

* moved a function to anonym namespace

* Subquery assert

* Review improvements

* Review improvements 2

* View node state to a separate var (microoptimization)

* Fixed index assert

* alignment

* C++ unit tests
2019-11-20 22:11:54 +03:00
Jan 932f8b5874
undistribute a few more queries (#10459) 2019-11-20 08:21:44 +01:00
Iurii Popov 26309c5c96 Feature/issue #642 (#10352)
* Index late materialization draft

* Index late materialization. Refactoring.

* Index late materialization. Expansion draft.

* HashIndexMock

* Refactoring.

* Hash index mock expansion fixes

* Fix compare of attributes.

* Hash index mock. Last expansion support.

* Hash index mock. Take value for array from document, not equal key.

* Optimizations.

* Query tests

* lateMaterialized improvements

* velocypack fixes and tests for index node

* Fix after merge.

* Const expression in a condition test

* Clone tests

* More tests

* Fix for materialized view (nullptr var)

* Fixed index vars registers count planning

* javascript tests

* Fixed cluster tests

* Cluster support

* MaterializeExecutor and MaterializerExecutorInfos refactoring

* More tests

* js tests rocksdb only

* js test. Removed print()

* js testd added skiplist

* C++ unit tests for invalid json

* js test var i

* js tests == -> ===

* iFix js tests ===

* jslint ;

* int unsigned int fix

* double deletion fix

* refactoring

* Added const for collection source

* override final, added materialize namespace, fixed femove in hash index mock

* Removed expansion support. Index can contain null value in case of several object with same fields

* isNumber<>

* Optimization for single collection case

* Renaming

* refactoring

* Unit tests. Added checking documents

* !sliceIt.valid() instead of !(!=)

* Fix primary index (object instead of array)

* Edge collection test

* Windows compilation fix

* IndexExecutor getCallback optimization

* ADB_UNLIKELY

* explainer.js

* removed unsused variable in js test

* fix explainer.js

* do not use several indexes with js test

* Removed several indexes implementation

* space

* fix explainer.js

* fix explainer.js

* code alignment
2019-11-07 19:16:33 +03:00
jsteemann 791c926327 make "parallelize-gather" an optimizer rule, so it can be turned off 2019-10-30 11:54:28 +01:00
Simon Grätzer 5e0321900e
Merge branch 'feature/parallel-aql-phase-one' of github.com:arangodb/arangodb into feature/parallel-aql-phase-one 2019-10-29 11:47:13 +01:00
jsteemann b2f6fb105c added "parallel" output to explainer 2019-10-22 16:05:12 +02:00
Michael Hackstein bf2423d024
Feature/explain spliced subqueries (#10298)
* Implemented explain output for Subquery start and End nodes. Unfortunately i had to inject a temporary output variable for the Subquery start.
2019-10-22 15:38:33 +02:00
Jan 19fad3f0df
fix error message (#10281) 2019-10-22 09:38:40 +02:00
Wilfried Goesgens 9883518621 when changing between leader and follower re-attempt connecting to circumvent OS resource shortages (#10243) 2019-10-14 11:54:37 +03:00
Dronplane a1014ac701 Bug fix/internal issue #600 - Late document materialization (#10006)
* Applied review cAdded sceleton optimizer functionomments

* Added mask for rule

* Applied review cAdded sceleton optimizer functionomments

* Added mask for rule

* adding plan traversal for rule

* Rule execution block developing

* Experiment with additional block

* LIMIT node modifications

* implemented late materialization base version.

* Code cleanup

* Added check for variable usage

* Implemented serialization and cloning

* Fixed build errors

* Implemented late materialization for  LimitNode

* Moved materialization to Sort Node

* Removed LimitNode modiications

* Implemented skipRows to speedup single server

* Added tests for optimizer rule

* fixed build

* Fix mac build

* Fixed mac build

* Fixed PR test run errors

* Added tmp fix for cluster test runs

* removed debug print

* Make materialization stick to last sort node. Add late materialization to explainer

* Updated optimization rule to search optimal SortNode to do materialization

* Refined optimization rules for cluster

* Added tests for SortExecutor and IResearchViewNode

* Fixed  mac buid. Removed misplaced assertion.

* Fixed build

* Updated tests. Coded cleanup

* Code cleanup

* made function name for SortedExecutor match name in ConstraintSortedExecutor

* cleanup

* Fixed test run

* made scoring results stable across cluster

* Make optimize rule stop if  sort node for limit node is not suitable

* Disabled constrained sort for materializing SortNode

* reverted SortNode modifications

* Implemented separate materializer node

* Fixed tests  to account new materialize node

* Code cleanup

* reverted debugging change

* Fixed test jslint error  and comments

* MaterializeNode renamed

* enum value renamed for materialize node

* Code cleanup

* code cleanup and optimization

* Fixed clang warning

* Applied review comments

* Out variable planning moved to materialize node

* inlined getters in ReadContex
2019-10-08 18:38:47 +03:00
Jan 21b0311d57
rename minReplicationFactor to writeConcern (#10118) 2019-10-07 15:12:15 +02:00
Jan 6f14048bbe
implement early pruning of documents in EnumerateCollectionExecutor (#10159) 2019-10-05 13:38:23 +02:00
Wilfried Goesgens 823640e8f7 Feature/testing result evaluation (#10124) 2019-10-02 17:49:32 +02:00
Jan c3423c7db0
Bug fix/disallow sharding on rev (#10123) 2019-10-01 19:42:55 +02:00
Wilfried Goesgens 636b2e5d5f fixed version of arangosh result evaluation refactoring - properly count objects (#10080) 2019-09-26 12:07:52 +02:00
Jan 4f2e1d4054
fixed issue #10062: AQL: Could not extract custom attribute (#10068) 2019-09-24 14:36:53 +02:00
Jan Christoph Uhde 0b8c75c7b7 one shard db - devel (#9395) 2019-09-23 15:48:37 +02:00
Jan 46f3fa6923
fix graph error message (#10041) 2019-09-19 10:32:36 +02:00
Heiko b9dd097f8d Bug fix/arangosh gharial vertex deletion (#9921)
* typo in route

* unused function removed

* added general graph standalone and cluster tests, formatting

* added changelog entry

* Update CHANGELOG

Co-Authored-By: Michael Hackstein <michael@arangodb.com>

* Update CHANGELOG

Co-Authored-By: Michael Hackstein <michael@arangodb.com>

* removed fail, removed print
2019-09-06 12:26:10 +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
Markus Pfeiffer 753ff4aa67 Feature/atomic database creation 2 (#9826) 2019-09-05 12:38:07 +02:00
jsteemann d1b1b6726f Revert "Feature/resource usage (#9647)"
This reverts commit 76afb5001e.
2019-09-03 12:48:02 +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 1e9ad7fbb9
show query string length and cacheability in explain output (#9767) 2019-08-21 12:06:32 +02:00
Tobias Gödderz 6b3e11dd40 Fixed error code to not re-use an old one (#9686) 2019-08-13 15:18:45 +02:00
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
KVS85 0c6d3b7ddc
Set jsunity output to gtest style (#9646)
* Set jsunity output to gtest style

* More pretty printing

* Fix jslint

* Remove unnecessary spaces
2019-08-07 22:37:00 +03:00
Simran 71d2651f2c
Aardvark: Add k Shortest Paths example graph to UI (#9491)
* Add example graph to UI

* Add kShortestPathsGraph to examples.js

* Update example-graph.js

* Update aardvark.js
2019-08-07 16:41:38 +02:00
Lars Maier ed496fe5dd Feature/hotbackup devel (#9495)
Hotbackup
2019-08-02 11:39:46 +02:00
Wilfried Goesgens c76d3a0323 fix test result handling of tests running in own spawned arangosh (#9576) 2019-07-26 15:03:24 +02:00
Matthew Von-Maszewski 91b56a50a3
Feature: Add gzip and encryption to import/export (#9560)
* port of feature-3.4/mv-gzip-export to devel branch

* add explicit namespaces so gcc 6.3.0 would successfully compile

* add conditional cleanup of ENCRYPTION file from another branch

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

* change from ifdef for lseek variants to TRI_LSEEK.

* force Windows lseek to return Linux expected type.
2019-07-26 07:53:39 -04:00
jsteemann f9cb4d6590 fix explainer for compatibility with 3.4 2019-07-24 17:55:50 +02:00
Jan 973f00a997
Added startup error for bad temporary directory setting. (#9552)
* Added startup error for bad temporary directory setting.

  If the temporary directory (--temp.path) setting is identical to the database
  directory (`--database.directory`) this can eventually lead to data loss, as
  temporary files may be created inside the temporary directory, causing overwrites of
  existing database files/directories with the same names.
  Additionally the temporary directory may be cleaned at some point, and this would lead
  to an unintended cleanup of the database files/directories as well.
  Now, if the database directory and temporary directory are set to the same path, there
  will be a startup warning about potential data loss (though in ArangoDB 3.4 allowing to
  continue the startup - in 3.5 and higher we will abort the startup).
2019-07-24 12:47:42 +02:00
Michael Hackstein 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
Wilfried Goesgens 2da0fb356d Feature/cleanup j client api (#9457) 2019-07-19 09:23:24 +02:00
Wilfried Goesgens 1c408dc2fb connect the mocha testresults if we run it in an extra arangosh instance (#9485)
* connect the mocha testresults if we run it in an extra arangosh instance

* fix status handling, lint
2019-07-18 16:41:11 +03:00
Wilfried Goesgens 9449f6a85a migrate mochaGrep into --testCase parametrizing (#9438)
* migrate mochaGrep into --testCase parametrizing

* fix filter forwarding for spawned arangoshs - add mocha version

* sometimes we have the string undefined to ignore
2019-07-18 16:35:44 +03:00
Jan 5c39692c20
remove several outdated error codes (#9402) 2019-07-05 13:36:16 +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
Andrey Abramov cf7d5bfa95 fix arangosearch explanation (#9365) 2019-06-28 19:51:34 +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
Frank Celler 6b16d1c0a5 Revert "Fix Buffer methods (#9070)"
This reverts commit 6c96e5dd24.
2019-06-07 10:18:58 +02:00
Jan 074397d367
allow "stream" attribute on top level (#9195) 2019-06-05 15:48:58 +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
Markus Pfeiffer 73ac4f194d (K_)SHORTEST PATHS: Display correct directions in explainer/profiler (#9080) 2019-05-29 15:31:09 +02:00
Michael Hackstein 1a6719e144
Revert "(K_)SHORTEST PATHS: Display correct directions in explainer/profiler (#9049)" (#9074)
This reverts commit 44d15db812.
2019-05-22 16:46:45 +02:00
Markus Pfeiffer 44d15db812 (K_)SHORTEST PATHS: Display correct directions in explainer/profiler (#9049) 2019-05-22 16:06:46 +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
Jan 49babbc66b
handle incomplete read errors (#9021) 2019-05-20 14:13:41 +02:00
Frank Celler 148ba5f288 Revert "Fix Foxx security (#9020)"
This reverts commit a57b6b86ef.
2019-05-18 09:55:13 +02:00