1
0
Fork 0
Commit Graph

297 Commits

Author SHA1 Message Date
Andrey Abramov d4a010baf9
Bug fix/internal issue #316 (#7911)
* allow using scorers outside ArangoSearch view context

Signed-off-by: Andrey Abramov <andrey@arangodb.com>

* ensure query is properly optimized after replacement of scorer functions

* do not apply `handleViewsRule` to queries without views

* simplify optimization rule for ArangoSearch views

* show ArangoSearch view scorers in query explanation

* fix tests

* fix tests

* add stub for scorer related tests

* reformat

* check variable depth in `ViewExpressionContext::getVariableValue`

* add some tests

* address js test failures

* address jslint errors

* ensure `IResearchViewNode` exposes variables used in scorers

* ensure scorers with expressions are deduplicated

* fix deduplication for indexed access

* more tests

* partially address review comments

* address review comments

* simplify code

* remove irrelevant, commented out code

* ensure array comparisons are properly handled

* update changelog & loki
2019-01-10 21:04:19 +03:00
Jan fe81007438
support db._explain with all plans (#7895) 2019-01-08 18:06:46 +01:00
Alan Plum c36c8c48ee Teach Foxx req.makeAbsolute about unix sockets (#7327)
* Expose rawReq.server.endpoint in JS

* Make rawReq.portType enumerable

This is not strictly necessary but we don't gain much from hiding its existence.

* Allow using http: protocol in local requests

This helps distinguishing local request URLs from file paths in ambiguous contexts.
The alternative would require the user to specify the local endpoint but this doesn't work with
sockets (and for non-sockets would incur the penalty of a real network roundtrip).

* Teach Foxx req.makeAbsolute about unix sockets

* Add Foxx socket tests
2018-11-20 14:20:56 +01:00
Jan 4631cfb5e8
do not create _modules collection for new databases/installations (#7291) 2018-11-13 11:40:15 +01:00
Dan Larkin-York 0bc6a4d7a2 Fix query profiling discrepancy in console. (#7241) 2018-11-06 14:50:32 +01:00
Jan 9bb460c3d5
do not rely on _modules collection being present at startup (#7118) 2018-10-29 13:54:34 +01:00
Wilfried Goesgens 15a366b17f Bug fix/fix duplicate testcasenames (#7003) 2018-10-23 11:18:22 +02:00
Jan 6d54518145
forward port changes from 3.4 (#6849) 2018-10-12 17:49:17 +02:00
Jan 46efcff7d7
micro improvements (#6674) 2018-10-05 10:25:13 +02:00
Alan Plum 78425e510c Add support for nested aql queries in JS (#6482)
* Add support for nested aql queries in JS

* updated documentation
2018-09-26 14:21:24 +02:00
Jan ae85fbc4ea
much better diagnostics for AQL query results cache (#6580) 2018-09-25 09:49:11 +02:00
Jan dbe4559ed1
fix some issues with sorted variant of COLLECT (#6433) 2018-09-10 17:01:51 +02:00
Jan 3752c7deab
fix profile output for nodes without calls to getSome (#6397) 2018-09-10 09:19:01 +02:00
Wilfried Goesgens a30a93aa3f fix example, so geo indices are actually used (#6305) 2018-08-30 19:22:13 +02:00
Wilfried Goesgens 72b2909dc9 Doc - use standard geo-json in this example (#6291) 2018-08-30 04:41:57 +02:00
Alan Plum ecfdd8e698 Fix getReadableName (#6272)
* Move getReadableName to new test folder

* More tests

* Fix getReadableName

* Linting
2018-08-29 17:20:52 +02:00
jsteemann 05cbc5a9ec jslint 2018-08-28 15:12:28 +02:00
Alan Plum cfa0e0db55 Better foxx errors (#6264)
* Fix codeFrame formatting

Pushing the codeFrame first results in ugly line breaks or extra spaces.

* Include cause in MODULE_FAILURE message

The error is always a wrapper for an underlying cause so it should be easier to determine what caused it.

* Add a codeFrame for failed _install

We normally only want this in dev mode but service CRUD should always provide detailed info.

* Expose codeFrame in Foxx CRUD

The codeFrame can only come from a failed _install, so let's make it visible to Foxx CLI and friends.

* Add codeFrame to runScript

Scripts can also only be executed with access to the Foxx API so we can provide the same info as during CRUD.

* Trim codeFrame fileName to basePath

If we have a basePath, we don't need to expose the full path to the user for the codeFrame to be meaningful.

* Fix getReadableName

Previously 'catch-fire' would become 'Catch  Ire'.

* Add to changelog
2018-08-28 14:36:33 +02:00
Jan 5022ccc24d
Bug fix/fixes 2508 (#6254) 2018-08-27 21:36:39 +02:00
Andrey Abramov 615e1cf7de
Feature/add options to view (#6255)
* added OPTIONS for views

* pass options too

* validation for OPTIONS

* fix OPTIONS validation

* removed debug log message

* add forceSync options

* add forceSync view option

* fix comments

* fix some memleaks

* fix typo

* fix integration tests

* fix integration tests

* fix another integration test

* rename 'forceSync' option to 'waitForSync'

* another attempt to fix test

* ensure query caches are properly invalidated

* address integration test failures

* another attempt to fix test
2018-08-26 22:30:23 +03:00
Jan 0d48677619
Bug fix/aql optimizer improvements 2308 (#6241) 2018-08-24 13:42:22 +02:00
Simon fc204a2b3e fix profiling code (#6190) 2018-08-20 12:59:07 +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
Alan Plum 1698687f4f Add uuidv4 & genRandomBytes methods (#5732) 2018-08-17 11:04:43 +02:00
Jan d7e631eddf
Bug fix/more sparsung (#6177) 2018-08-17 08:47:45 +02:00
Alan Plum dc2bca23cf Fix #5736 (#5844)
* Fix issue 5736

* Add #5736 to CHANGELOG
2018-08-15 14:11:20 +02:00
Tobias Gödderz de4f5587ae Gharial rewrite in C++ (#5631)
* Built a C++ skeleton REST handler for gharial, with fallback to the JS handler

* Moved aql::Graph to graph::Graph

* Added complete edge definitions to Graph

Also:
- some cleanup
- used forward-declarations in headers
- use Graph in graph rest handler

* Handle graph lookup failures according to the test suite

* Added GET vertex

* Bugfixes in ResultT

- Added missing #include
- Fixed move semantics

* Move central code of readVertex to GraphOperations

* ResultT fixes and complements

* Implemented a graph cache

* Added and used graph cache to the rest handler

* Added GET edge

* Added DELETE edge

* Extracted some code

* Added PATCH and PUT for both edge and vertex

* Moved update/replace transaction code to GraphOperations

* Added stub routes for POST and a TODO note

* Added a test checking that deleting a vertex removes all incident edges as well

* Added a test checking that deleting a vertex does not remove edges in non-graph collections

* fixed compiler warnings and errors

* Began work on DELETE vertex

For this, added a V8Context to allow for AQL queries to use subtransactions

* Continued work on DELETE vertex (still WIP)

* prep for graph post routes

* fixed removeVertex operation (aql)

* added post vertex and post edge gharial routes

* wasSynchronoues flag changed

* gharial post c++ handler, naming conventions

* added gharial tests

* temporary disabled cache (because not completed), added graph property read functions

* added c++ gharial list vertex collections

* added c++ gharial graph config

* added c++ gharial list graphs

* added graph manager class

* first implementation of create graph in c++, WIP

* changed error messages

* added etag to create graph api, still multiple edge definition check missing

* finished POST /_api/gharial/<graph>

* WIP - DELETE /_api/gharial/<graphName>

* added DELETE /_api/gharial/<graphName> validation, still missing correct response

* gharial delete

* fixed delete gharial lock

* finished DELETE /_api/gharial/<graphName>

* added routes for graph based vertices and edge definitions

* improved delete route

* added add new edge definition to existing graph

* patch edge definition in a graph, still <WIP>

* finished edit edge definition route

* code changes due to devel code changes

* added remove edge definition route

* added vertex delete function

* added todo note regarding one drop collection issue

* add oprhan collection to graph route implemented

* Added a test

* Updated a comment

* Several minor changes

* Minor changes during review

* Changes during review

* Changes during review

* Bugfix: orphans may be null or omitted

* Bugfix: resolve externals

* minor code changes

* seperated graph class to independent component classes

* seperated graph class to independent component classes

* removed log output

* fixed create collection behaviour in a cluster environment

* fixed enterprise graphs behaviour in c++ gharial api

* removed log output

* formatting

* improved error handling, fixed a linux compile bug

* more result refactoring

* more result type cleanup

* fixed wrongly defined test

* result handling

* error handling

* more refactoring

* Bugfix: avoid race condition in cluster when creating collections

* updated graph documentation

* added graph related static strings

* static strings, new method to create options for gharial created collections

* Some minor cleanup

* more use of static strings

* minor code changes, review

* added missing parseint

* removed gharial foxx, added js common module, added v8 general graph module

* correct use of virtual method

* more v8, js general graph, broken state

* more v8 graph functions

* fixed editEdgeDefinition, added drop function

* fixed drop behaviour

* added _list, _exists

* added c++ rename graph collections, added v8 + graph module function

* Added a regression test

* added graph._deleteEdgeDefinition, v8, server

* more v8g

* added _removeVertexCollection

* added _extendEditDefinitions

* todo, need to add a helper sort method for a local defined relation

* fixed test

* fixed lots of tests, added more client functions, _addVertexCollection on client module is still broken

* added more client graph functions, all tests green

* more client functions

* add del edge def route

* Fix use after move

* Minor changes in client general-graph.js module

* Make a copy before sorting (don't touch the argument)

* Minor changes and some additional asserts in graph tests

* Consistently set parameter defaults

* Renamed static strings

* Remove superfluous function

* Made comment more verbose

* Minor changes in general-graph-common.js

* Added missing template arguments

* Fixed community build

* Cleanup in editEdgeDefinition

* Regression test & bugfix: comparison of edge definitions didn' order from and to

* Fixed errors introduced by merge

* Minor changes in v8-general-graph.cpp

* Fixed test failure due to wrong error code in CE

* added missing id field

* Added permission checks for graph._create

* Removed assertion that is no longer valid

* Moved removeGraph from GraphOperations to GraphManager

* Allow C++ implementation of graph._drop to handle smart graphs

* Flush js client db cache after creating/dropping collections via the general graph module

* Added _deleteEdgeDefinition to the general graph client module

* WIP: Added permission checks for drop graph

* Fixed permission checks for drop graph

* Added permission checks for other graph operations

* Bugfix: assert edge definitions are returned in order

* Some cleanup

* Removed unused method

* Minor improvements in GraphManager

* Fixed a type in general-graph common module

* Most useful fix of all times ever: Do not auto cast from bool to int and alternate error/noerror by this

* Added the initial keyword to StaticStrings

* Added a new error code, used whenever a user tries to inject a documentcollection as a relation into the graph, which is invalid

* Some GraphManager/Ops/Graph cleanup. Less Slice parsing, more usage of GraphObjects

* Test edgeDefinitions in graphs with a defined ordering

* GraphClass Layout cleanup

* Do not test error messages, use codes instead

* Recreated backwards compatibility of Graph Creation Permission errors

* Changed error-code if edgedefinition is used twice

* Added a StaticString for the GraphName

* Renamed graphToVpack => graphForClient

* Partly fixed graph-api test to work with better error messages. Still red: The edgeDefinitions are now sorted, the test is supposed to sort his own list, but appearently does not do so. Under investigation

* Added a new error code that rejects injection of differently sharded smart collection into smartgraph. Should be more helpful to our users

* graph createCollectionOptions now require an open object to be cross-called from enterprise. Made enterprise switch for creation of graph more elegant.

* Updated graphs.cpp

* Massive refactoring. Made Factories for graphs to make SmartGraph much more transparent. Also reduced amount of multiple implementations of the same stuff. Killed vocbase/graphs use GraphManager instead. Removed usage of GraphCache, was not completely implemented anyway and only partially used, which is bad at the moment. Option for later improvement never the less

* Adapted JS code to now really use c++ variants. ALso included 3 Classes: Graph, SmartGraph and GraphModule.

* Fixed undefined behaviour in Remove Vertex. Fixed smartgraph sharding if one collection already exists.

* Removed DEBUG output

* Removed DEBUG logs

* Removed dead code

* Fixed Graph EdgeDefinition test, they now have a different ordering.

* Added a test when adding a vertexCollection that it is actually valid in the graph

* Client Graph API now correctly sends `orphanCollections` and not `orphans`

* Let GraphOperations modify the graph in-place. It should now properly handle edgeDefinitions.

* Added initial cid StaticString

* Included the vocbase in fromPersistence creation of Graphs. Only required to enhance 3.3 SmartGraphs on the fly.

* Fixed internal error message

* Fixed compiler isses originiated from merging

* Removed unused imports

* Regenerated generated file
2018-08-09 09:30:04 +02:00
Jan 42fdef45d4
Bug fix/fix profile query (#6073) 2018-08-06 17:02:27 +02:00
Jan e3ce2e8cfb
fix anonymization with unique indexes (#6068) 2018-08-03 12:17:05 +02:00
Heiko 434cfce699 Feature/query profiling ui (#6027) 2018-08-03 10:58:22 +02:00
Dan Larkin-York c34c858901 Add tests for job creation and removal. (#5894) 2018-07-18 12:34:51 +02:00
jsteemann 1ed2ac27ad create _fishbowl collection with same distribution as other system collections 2018-07-17 20:41:26 +02:00
Simran 34ec56d421 Feature/misc spelling corrections (#5164) 2018-07-13 13:06:20 +02:00
Jan Christoph Uhde bcf9e30a4d Feature/cluster single operations (#5585) 2018-07-12 20:18:36 +02:00
Wilfried Goesgens 5e296cb0c9 add ability to filter jsunity testsuites by testcase (#5807) 2018-07-12 13:35:29 +02:00
maxkernbach cf39008acb Doc - new page 'Remove vertex' in AQL examples (#5818) 2018-07-10 19:07:30 +02:00
jsteemann c0517b69f2 nicify output 2018-07-03 16:53:27 +02:00
maxkernbach 6586504441 Update demo graphs (UI + documentation) (#5535) 2018-06-27 14:16:44 +02:00
Wilfried Goesgens 2613ca56b9 add the primary indices to the AQL modification nodes serialization and their explain output (#5628) 2018-06-21 11:45:15 +02:00
Jan edb24deafe
cleanup collection/vocbase interface of ExecutionNodes (#5557) 2018-06-08 15:28:48 +02:00
maxkernbach 9d622c566c Doc - Dataset and example for Multiple Path Search (#5483) 2018-06-05 09:39:48 +02:00
Jan dc97eb0111
Subquery optimizations (#5398) 2018-05-28 13:56:03 +02:00
Jan a295eaa120
show AQL functions used in query in explain output (#5451) 2018-05-24 21:17:51 +02:00
Jan 7fe65115a3
do not log Foxx store updates with log level info, as the message does not provide any value to the end user (#5431) 2018-05-23 11:38:28 +02:00
Jan 4b1ef1dd3a
add support for named graphs (#5385) 2018-05-22 16:40:51 +02:00
Jan 8cd52ae95b
remove obsolete printBrowser function (#5259) 2018-05-04 11:30:39 +02:00
Jan 9c0460acff
Feature/aql optimizations (#5237) 2018-05-03 16:55:58 +02:00
Alan Plum 7a5139fe2c Add query, aql.literal (#5184)
* Add query, aql.literal

* Update ArangoDB.md
2018-05-03 14:18:20 +02:00
Simon 828f1d423c S2 based Geo-Spatial index (#5249) 2018-05-02 23:54:41 +02: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