1
0
Fork 0
Commit Graph

96 Commits

Author SHA1 Message Date
Dan Larkin-York 6fd419714f Move containers into their own folder and namespace. (#10244) 2019-10-14 10:55:55 +02:00
Jan a1775b7930
cleanup some of the internal APIs a bit (#10152) 2019-10-03 00:02:27 +02:00
Tobias Gödderz 82b0a5e745 De-inline in AQL (#10025)
* Enable IPO (LTO) via CMake

* Use separate IPO_ENABLED variable

* Enabled IPO for more binaries

* Enabled IPO for arangobackup

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

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

* Removed policies superseded by minimum cmake version

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

* Disable IPO with google tests only on AUTO

* Disable warning for correct line

* Begin de-inlining Aql

* de-inlining Aql: 2nd batch

* de-inlining Aql: 3rd batch

* de-inlining Aql: 4th batch

* Moved code out of ifdef

* Enabled IPO for additional libs

* Fixed some problems found with IPO enabled

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

* Set IPO globally, except for 3rdParty libs

* De-inlined AstHelper again (was undone due to a previous merge conflict)

* Added missing .cpp file

* Fixed compilation with MSVC

* Removed superfluous includes from deinlined AQL header files

* Added includes for size_t

* Deleted outdated files

* De-inlined files that were undone during the merge

* Removed includes from files that were undone during merge

* Fixed merge conflicts
2019-09-25 11:20:03 +02:00
Frank Celler aa3d3f8e40
Feature/cleanup ccpcheck (#9665) 2019-08-12 11:11:49 +02:00
Markus Pfeiffer d586ff8e95 Add K_SHORTEST_PATHS handling to optimizer and executor (#8895)
There were a few places where K_SHORTEST_PATHS was not handled. This
commit adds them.
2019-05-07 13:54:35 +02:00
KVS85 2d5bf58c94 Remove USE_IRESEARCH definition and usage (#8613) 2019-03-28 17:23:51 +01:00
Jan Christoph Uhde c3f7961b88 apply unique log ids (#8561) 2019-03-25 20:26:51 +01:00
Jan 9ce9312239
speed up containers that contain ExecutionNodes' variables (#7937) 2019-01-14 13:38:56 +01:00
Frank Celler ac9f375fb5 big reformat 2018-12-26 00:54:03 +01:00
Tobias Gödderz 9d8858d75c Fixed optimize-traversals and added a regression test (#6974)
* Fixed optimize-traversals and added a regression test

* Updated CHANGELOG
2018-10-23 09:45:54 +02:00
Jan 6f10211f09
this moves aql::Query* out of the call parameter to any aql::Function (#6485) 2018-09-13 23:37:46 +02:00
Dan Larkin-York 18d827688a Fix condition finders moving filters past modifications into index nodes (#6327)
* Fixed issue with condition finder pulling filter past modification node into index.

* Fixed issue with traversal condition finder pulling filter past modification node into index.

* fixed jslint
2018-09-01 13:34:23 +02:00
Jan 0d48677619
Bug fix/aql optimizer improvements 2308 (#6241) 2018-08-24 13:42:22 +02:00
Jan 99f176bed5 Feature/add search keyword (#6166)
* added SEARCH keyword

* fixes jslint errors

* add incompatibility notice

* remove VIEW keyword (does not work yet!!)

* add initial support for SEARCH keyword to optimizer rules

* replace FILTER with SEARCH keyword in tests

* removed VIEW keyword, make shell_server_aql tests pass again in single server

* cleanup

* handle SEARCH clause for views

* make SEARCH a non-keyword

* fixed an issue with duplicate variables

* fixed 3 tests

* fix SEARCH statement support for views

* minor refactoring

* fix integration tests

* optimize SEARCH conditions a bit more

* fix jslint error

* fixed wrong comments and typo in class name

* fix documentation

* adjust recovery tests to use SEARCH instead of FILTER

* fix another failing test
2018-08-18 20:22:58 +03:00
Jan 95d1892f18
remove canThrow attribute from AQL functions (#6123)
Its was somehow overlapping with the isDeterministic attribute (but with the opposite meaning)
2018-08-09 16:45:54 +02:00
Andrey Abramov e117a97fb4
Feature/arangosearch scatter node (#5536)
* remove collection dependency from scatter

* simplify `createBlock` API

* remove useless IResearchViewScatter node

* some fixes

* code cleanup

* scatter arangosearch view

* cleanup

* fix compilation errors

* fix test issues

* store shared_ptr rather than raw pointer in IResearchViewNode

* refactor ScatterBlock

* refactor DistributeBlock

* ensure no leaks during execution node cloning

* some fixes

* code cleanup

* remove vocbase from `DistributeNode`

* add missing ifdef

* fixes after review
2018-06-06 20:42:53 +03:00
jsteemann 27e985d5d0 safer casts for ExecutionNode types 2018-05-10 20:08:37 +02:00
Andrey Abramov ddd8ef6667 refactor execution node type enum to be less error prone 2018-05-08 16:23:56 +03:00
Andrey Abramov 4649b40b96
Coordinator ArangoSearch view + Execution nodes + AgencyMock (#5160)
* add initial implementation of scatter view rule and node

* add tests for `IResearchViewNode` and `IResearchViewScatterNode`

* add missing check

* modify IResearch execution nodes to use references instead of pointers

* use view id in searialized `ExecutionNode` representation instead of the name

* add cluster mode stubs and checks

* very first attempt to distribute IResearchViewNode

* further implementation of cluster-wide arangosearch views

* fix invalid json format

* add tests for coordinator iresearch view

* allow to retrieve a list of existing views on a coordinator

* more tests for coordinator iresearch view

* some fixes to enable query explanation

* remove Collection dependency from RemoteNode

* remove unnecessary remote ArangoSearch view scatter

* fix explanation appearance

* add some assertions

* minor fixes

* implement IResearchViewCoordinator::updateProperties

* fix view DDL issues

* handle link modifications in DDL operations

* add coordinator implementation of iresearch view links

* fix tests

* further coordinator based view DDL implementation

* further IResearchViewCoordinator implementation

* add initial implementation of AgencyMock

* fix some tests

* code cleanup

* extend test + some fixes

* more tests for IResearchViewCoordinator

* fix tests for IResearchLinkCoordinator

* some fixes after merge

* fix tests

* remove declaration of nonexistent (previously removed) method

* some fixes after review

* remove string duplication

* more tests and fixes

* more fixes and tests

* more tests

* one more test

* fix 'use-after-free' asan error

* fix non-enterprise tests issues
2018-05-02 00:15:11 +03:00
Wilfried Goesgens 7d6e580780 Refactoring & code cleanup (#5138) (#5142) 2018-04-24 14:42:23 +02:00
Jan b325d05357
Bug fix/aql auto keep on collect (#4795)
* automatically detect which variables to keep in AQL COLLECT

If a COLLECT INTO is used, then it is detected which sub-attributes
of the into variables are used later in the query, and automatic
KEEP instructions are added to the COLLECT if possible

Example query:

    FOR doc1 IN collection1
      FOR doc2 IN collection2
        COLLECT x = doc1.x INTO g
        RETURN { x, all: g[*].doc1.y }

would be turned into

    FOR doc1 IN collection1
      FOR doc2 IN collection2
        COLLECT x = doc1.x INTO g KEEP doc1
        RETURN { x, all: g[*].doc1.y }

and prevent `doc2` from being temporarily stored in the variable `g`

* fix runtime warnings

* increase default flush timeout

* added tests
2018-03-14 13:59:46 +01:00
Dan Larkin 96dbc693db Speed up condition normalization (DNF conversion) (#4574) 2018-02-13 22:13:52 +01:00
Jan 2a96df5ca5
Feature iresearch (#4071) 2017-12-18 15:04:59 +01:00
Jan 0a71b54e1f fix out-of-bounds attribute accessor calls (#3273) 2017-09-18 14:01:06 +02:00
Simon Grätzer ffc465433a No access collections Improvements (#3190)
* consolidated EdgeDocumentToken

* optimizing cluster traversal

* adding skip collection checks

* API cleanup

* copying AQLValue to avoid use-after-free bugs

* Fixing rocksdb SingleServerEdgeCursor

* Fixing a collection resolving issue
2017-09-07 14:55:07 +02:00
mchacki 0b4374ead5 Fixed invalid optimisation for variables/references used in traversal 2017-08-09 17:01:18 +02:00
Michael Hackstein 806145ac32 Improved the check if we need to increase the mindepth on traversal nodes 2017-08-07 17:46:02 +02:00
Michael Hackstein b017b00a87 Implemented recognition if the path is left or right of the operand during optimization phase 2017-08-05 10:36:27 -06:00
Michael Hackstein 51ad1f51fa Implemented a check if a condition yields TRUE if compared to NULL value. This is used in traversal optimisation in case the condition is applied after the minDepth of traversal. If NULL is included we shall not increase the minDepth, it NULL is excluded we need to increase it. 2017-08-04 18:00:54 -05:00
Michael Hackstein 2cd48e614b Feature/optimizer rule remove filter covered by traversal (#2731)
* Added a first test for remove-filter-covered-by-traverser rule.

* initial try at adding the functions

* Initial try at fixing all cases

* Fixing optimizer rule order

* Changing rule

* excluding quantifier ANY

* Fixing assertion error

* quick fix for some failed traverser cases

* Fixing quantifier related tests

* Adding upper limit for scannedIndex in cluster

* Fixing the mmfiles asserts

* Allow the coordinator to do condition checking on edges again. Used in enterprise.

* Fix naming of optimizer rules (#2739)
2017-07-10 10:15:17 +02:00
Frank Celler 6b47544611 Revert "Feature/optimizer rule remove filter covered by traversal" (#2724)
* Revert "Feature/authorization query cache (#2720)"

This reverts commit 83712b7b4a.

* Revert "properly return index in case of unique constraint violation (#2716)"

This reverts commit c3f346e0a5.

* Revert "fix https://github.com/arangodb/planning/issues/388 (#2714)"

This reverts commit 1d944b97a4.

* Revert "fix typo (#2718)"

This reverts commit 61a80ed697.

* Revert "Feature/optimizer rule remove filter covered by traversal (#2676)"

This reverts commit c54b81fb69.
2017-07-04 11:13:36 +02:00
Simon Grätzer c54b81fb69 Feature/optimizer rule remove filter covered by traversal (#2676) 2017-07-03 18:39:32 +02:00
Jan 94b4a9ec4b added "deduplicate" attribute for array indexes (#2644) 2017-06-30 17:53:50 +02:00
jsteemann 09919cfc36 fixed issue #2320 2017-02-23 10:14:42 +01:00
jsteemann bc080ae58f removed unused node type 2017-02-14 16:52:30 +01:00
jsteemann 1e78acad49 fix size_t vs uint64_t confusion 2017-02-10 23:43:47 +01:00
jsteemann d024a6d00a remove logging for non-topics 2017-02-10 09:32:50 +01:00
Michael Hackstein ef8ca78dfb Added more tests for traversal optimization. Fixed an crash-error when optimizing . 2017-01-31 15:30:59 +01:00
Michael Hackstein dcdc495c63 Fixed unintentially commited typo. 2017-01-27 19:30:26 +01:00
Michael Hackstein 2fe7a93f6e Improved TraversalCondition finder. It now does not crash anymore when filtering on TraverserOutput e.g. p.edges[0] == p.edges[1] and can make use of Array Indexes in certain cases. 2017-01-27 19:22:17 +01:00
Michael Hackstein 9b5810d84b The TraversalConditionFinder will now normalize all filters, before checking if they are valid 2017-01-27 09:57:46 +01:00
Michael Hackstein ff4430f346 Intermediate version of TraversalConditionFinder. The checks weather a FILTER is feasable for optimization partly cleaned. Next step is complicated and dangerous. 2017-01-26 17:24:39 +01:00
jsteemann f0a4d69b69 use bulk allocator for index elements 2016-12-09 21:40:49 +01:00
jsteemann 9d9b4871ba fixes for Visual Studio 2016-10-31 12:16:39 +01:00
jsteemann cfc9ecd198 fix Visual Studio complaints 2016-10-31 09:59:18 +01:00
Michael Hackstein 63d086eb4f Fixed optimization of ANY in Traversals. It was included in the traverser who actually cannot handle it. 2016-09-22 17:24:39 +02:00
Michael Hackstein 4f50911c88 Fixed a bug in Traversal Explainer. Also fixed undefined behaviour when directly checking for an attribute omitting == true in early traversal filter. 2016-09-06 18:46:40 +02:00
Michael Hackstein e8ff84c8da cppcheck fixes and dead code cleanup. 2016-08-11 11:15:38 +02:00
Michael Hackstein 773e9971b7 First draft of optimization ALL== NONE==. Not yet complete. 2016-08-10 14:05:25 +02:00
Michael Hackstein 207d978afc Internal cleanup. Moved traversal options to a central place and removed the AQL-only version which was mostly redundant. This is preperation for Cluster initialisation. 2016-07-29 14:46:11 +02:00