1
0
Fork 0
arangodb/lib/Basics
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
..
ArangoGlobalContext.cpp always look in etc/relative first for config files (#6049) 2018-08-03 09:38:08 +02:00
ArangoGlobalContext.h always look in etc/relative first for config files (#6049) 2018-08-03 09:38:08 +02:00
AssocHelpers.h
AssocMulti.h allow master & slave to work in parallel for RocksDB WAL tailing (#6059) 2018-08-03 13:37:53 +02:00
AssocMultiHelpers.h allow master & slave to work in parallel for RocksDB WAL tailing (#6059) 2018-08-03 13:37:53 +02:00
AssocUnique.h allow master & slave to work in parallel for RocksDB WAL tailing (#6059) 2018-08-03 13:37:53 +02:00
AssocUniqueHelpers.h allow master & slave to work in parallel for RocksDB WAL tailing (#6059) 2018-08-03 13:37:53 +02:00
AttributeNameParser.cpp
AttributeNameParser.h Feature/efficiency (#3736) 2018-01-05 16:51:31 +01:00
CleanupFunctions.cpp Bug fix/lock file cleanup (#5960) 2018-07-24 09:43:15 +02:00
CleanupFunctions.h Bug fix/lock file cleanup (#5960) 2018-07-24 09:43:15 +02:00
Common.h added __attribute__((unused)) and other minor tweaks to silence some of the warnings (#6035) 2018-08-01 13:22:45 +02:00
ConditionLocker.cpp Parallelize arangodump (#4356) 2018-03-26 15:55:14 +02:00
ConditionLocker.h Parallelize arangodump (#4356) 2018-03-26 15:55:14 +02:00
ConditionVariable.cpp Bug fix/meierloch (#5895) 2018-07-17 11:39:50 +02:00
ConditionVariable.h Bug fix/meierloch (#5895) 2018-07-17 11:39:50 +02:00
ConditionalDeleter.h
DataProtector.cpp
DataProtector.h remove TRI_usleep and TRI_sleep, and use std::this_thread::sleep_for … (#3817) 2017-12-06 18:43:49 +01:00
DeadlockDetector.h Deadlock detection uses TransactionID instead of Thread ID (#4787) 2018-03-09 18:35:38 +01:00
Endian.h VST support in arangosh (#6047) 2018-08-08 12:18:54 +02:00
EnumIterator.h
Exceptions.cpp Bug fix/replication improvements (#5962) 2018-07-25 09:04:50 +02:00
Exceptions.h Bug fix/replication improvements (#5962) 2018-07-25 09:04:50 +02:00
FileResult.h
FileResultString.h
FileUtils.cpp make arangovpack work without any config file specified (#5224) 2018-04-30 18:33:42 +02:00
FileUtils.h fixed minor several compiler complaints (#5406) 2018-05-23 11:50:00 +02:00
FixedSizeAllocator.h
FloatingPoint.h Bug fix/fixes 0409 (#3199) 2017-09-04 18:04:05 +02:00
HybridLogicalClock.cpp
HybridLogicalClock.h Bug fix/replication improvements (#5962) 2018-07-25 09:04:50 +02:00
IndexBucket.h Bug fix/fixes 0609 (#3227) 2017-09-13 16:28:21 +02:00
LdapUrlParser.cpp forward-port LDAP changes (#4766) 2018-03-06 22:32:53 +01:00
LdapUrlParser.h forward-port LDAP changes (#4766) 2018-03-06 22:32:53 +01:00
LocalTaskQueue.cpp Feature/remove event loop (#5565) 2018-06-11 11:46:17 +02:00
LocalTaskQueue.h Using asio::io_context::strands instead of locks (#5266) 2018-05-07 15:58:19 +02:00
Locking.h
LruCache.h remove tabstops 2018-07-16 15:00:12 +02:00
Mutex.cpp Changes for libmusl compilation. (#4294) 2018-01-16 09:22:45 +01:00
Mutex.h fix premature unlock (#3802) 2017-12-13 13:27:42 +01:00
MutexLocker.h fix small issues found by cov-build (#2746) 2017-07-07 12:36:11 +02:00
MutexUnlocker.h fix some issues found by coverity code scan (#3256) 2017-09-21 10:26:59 +02:00
Nonce.cpp dont use memory for nonces if not needed (#5638) 2018-06-20 14:28:41 +02:00
Nonce.h dont use memory for nonces if not needed (#5638) 2018-06-20 14:28:41 +02:00
NumberUtils.h added __attribute__((unused)) and other minor tweaks to silence some of the warnings (#6035) 2018-08-01 13:22:45 +02:00
OpenFilesTracker.cpp
OpenFilesTracker.h
PerformanceLogScope.h
ReadLocker.h Bug fix/refactor read write locks (#5215) 2018-05-24 21:18:00 +02:00
ReadUnlocker.h Feature/misc spelling corrections (#5164) 2018-07-13 13:06:20 +02:00
ReadWriteLock.cpp Bug fix/refactor read write locks (#5215) 2018-05-24 21:18:00 +02:00
ReadWriteLock.h update copyright, use uin32_t everywhere 2018-07-18 23:43:44 +02:00
ReadWriteSpinLock.h View Replication (#5915) 2018-07-26 10:28:46 +02:00
Result.h Gharial rewrite in C++ (#5631) 2018-08-09 09:30:04 +02:00
RocksDBLogger.cpp Bug fix/issues 1708 (#3060) 2017-08-17 21:48:27 +02:00
RocksDBLogger.h Feature/misc spelling corrections (#5164) 2018-07-13 13:06:20 +02:00
RocksDBUtils.cpp remove TRI_ERROR_ARANGO_VIEW_NOT_FOUND, rename TRI_ERROR_ARANGO_COLLECTION_NOT_FOUND to TRI_ERROR_ARNANGO_DATA_SOURCE_NOT_FOUND 2018-03-17 19:36:14 +03:00
RocksDBUtils.h finalize `--rocksdb.sync-interval` feature (#5856) 2018-07-17 11:09:57 +02:00
RollingVector.h
SameThreadAsserter.h
ScopeGuard.h Bug fix/meierloch (#5895) 2018-07-17 11:39:50 +02:00
SharedAtomic.h Optimizations for Caches and Graph Traversals (#3169) 2017-08-31 18:33:10 +02:00
SharedCounter.h Optimizations for Caches and Graph Traversals (#3169) 2017-08-31 18:33:10 +02:00
SharedPRNG.cpp Optimizations for Caches and Graph Traversals (#3169) 2017-08-31 18:33:10 +02:00
SharedPRNG.h fix clang warnings 2017-09-01 12:08:31 +02:00
SmallVector.h Bug fix/fixes 0609 (#3227) 2017-09-13 16:28:21 +02:00
StaticStrings.cpp Gharial rewrite in C++ (#5631) 2018-08-09 09:30:04 +02:00
StaticStrings.h Gharial rewrite in C++ (#5631) 2018-08-09 09:30:04 +02:00
StringBuffer.cpp Reuse buffers for HttpResponse (#3433) 2017-10-30 17:30:36 +01:00
StringBuffer.h fixed minor several compiler complaints (#5406) 2018-05-23 11:50:00 +02:00
StringHeap.cpp
StringHeap.h
StringRef.cpp
StringRef.h
StringUtils.cpp Levenshtein Distance function implementation with documentation and i… (#5922) 2018-07-25 12:48:58 +02:00
StringUtils.h Regex Split Implementation (unfinished) (#5991) 2018-08-01 12:09:36 +02:00
Thread.cpp Bug fix/cleanup 2805 (#5477) 2018-05-29 10:16:48 +02:00
Thread.h Bug fix/cleanup 2805 (#5477) 2018-05-29 10:16:48 +02:00
TimedAction.h Bug fix/fixes 0211 (#3568) 2017-11-09 12:48:15 +01:00
Utf8Helper.cpp Feature/efficiency (#3736) 2018-01-05 16:51:31 +01:00
Utf8Helper.h Feature/efficiency (#3736) 2018-01-05 16:51:31 +01:00
VERSION.in
VPackStringBufferAdapter.h
VelocyPackDumper.cpp fixed minor several compiler complaints (#5406) 2018-05-23 11:50:00 +02:00
VelocyPackDumper.h
VelocyPackHelper.cpp Bug fix/wenn der shard mann 2mal klingelt (#5890) 2018-07-26 15:37:40 +02:00
VelocyPackHelper.h Bug fix/wenn der shard mann 2mal klingelt (#5890) 2018-07-26 15:37:40 +02:00
WriteLocker.h Bug fix/refactor read write locks (#5215) 2018-05-24 21:18:00 +02:00
WriteUnlocker.h Feature/misc spelling corrections (#5164) 2018-07-13 13:06:20 +02:00
application-exit.cpp fixed minor several compiler complaints (#5406) 2018-05-23 11:50:00 +02:00
application-exit.h
asio_ns.h Feature/remove event loop (#5565) 2018-06-11 11:46:17 +02:00
build-date.h.in
build-repository.h.in
build.h.in
conversions.cpp Bug fix/meierloch (#5895) 2018-07-17 11:39:50 +02:00
conversions.h Bug fix/meierloch (#5895) 2018-07-17 11:39:50 +02:00
cpu-relax.h fixes for MSVC 2017-09-01 13:24:44 +02:00
crc1.S
crc4.S
crc5.S Further fixes for libmusl completely static build. (#4474) 2018-02-01 13:38:34 +01:00
csv.cpp Bug fix/fixes 0609 (#3227) 2017-09-13 16:28:21 +02:00
csv.h Bug fix/fixes 0609 (#3227) 2017-09-13 16:28:21 +02:00
datetime.cpp fix date test 2018-05-16 16:20:45 +02:00
datetime.h avoid redundant creation of the same regexes (#5343) 2018-05-14 17:36:22 +02:00
debugging.cpp Bug fix/meierloch (#5895) 2018-07-17 11:39:50 +02:00
debugging.h Bug fix/meierloch (#5895) 2018-07-17 11:39:50 +02:00
directories.h.in remove unused defines from directories.h.in (#5407) 2018-05-22 11:32:46 +02:00
encoding.h
error.cpp Bug fix/replication improvements (#5962) 2018-07-25 09:04:50 +02:00
error.h Bug fix/replication improvements (#5962) 2018-07-25 09:04:50 +02:00
errors.dat Gharial rewrite in C++ (#5631) 2018-08-09 09:30:04 +02:00
exitcodes.cpp remove code that potentially throws from ~WBReader (#4282) 2018-01-15 15:14:55 +01:00
exitcodes.dat remove code that potentially throws from ~WBReader (#4282) 2018-01-15 15:14:55 +01:00
exitcodes.h remove code that potentially throws from ~WBReader (#4282) 2018-01-15 15:14:55 +01:00
fasthash.cpp Bug fix/fix compilation with gxx7 (#3637) 2017-11-10 16:00:57 +01:00
fasthash.h Feature/mmfiles hash lookup performance (#3265) 2017-09-26 14:48:06 +02:00
files.cpp always look in etc/relative first for config files (#6049) 2018-08-03 09:38:08 +02:00
files.h always look in etc/relative first for config files (#6049) 2018-08-03 09:38:08 +02:00
fpconv.cpp
fpconv.h
gcd.h
hashes.cpp
hashes.h
json.cpp Feature/misc spelling corrections (#5164) 2018-07-13 13:06:20 +02:00
json.h Bug fix/fixes 0609 (#3227) 2017-09-13 16:28:21 +02:00
levenshtein.cpp
levenshtein.h
locks-posix.cpp Bug fix/meierloch (#5895) 2018-07-17 11:39:50 +02:00
locks-posix.h Bug fix/meierloch (#5895) 2018-07-17 11:39:50 +02:00
locks-win32.cpp Bug fix/meierloch (#5895) 2018-07-17 11:39:50 +02:00
locks-win32.h fix warning 2018-07-23 14:59:05 +02:00
locks.h Bug fix/meierloch (#5895) 2018-07-17 11:39:50 +02:00
make_unique.h
memory-map-posix.cpp improve startup resilience in case there are datafile errors (#4975) 2018-04-03 17:32:30 +02:00
memory-map-posix.h try to make it work on older Linux kernels (pre 3.4) (#2642) 2017-06-22 14:23:04 +02:00
memory-map-win32.cpp fix potential duplicate closing of typed buffer (#3587) 2017-11-07 10:27:51 +01:00
memory-map-win32.h do not include our datafiles in core files (#2630) 2017-06-22 12:34:27 +02:00
memory-map.h potential fix for issue #3517: several "filesystem full" errors in log… (#3525) 2017-10-30 17:28:59 +01:00
memory.cpp remove now obsolete remainders of memory management functions (#3820) 2017-12-06 18:43:34 +01:00
memory.h remove now obsolete remainders of memory management functions (#3820) 2017-12-06 18:43:34 +01:00
messages.h
mimetypes.cpp clean up generator code (#4191) 2018-01-02 15:26:06 +01:00
mimetypes.dat
mimetypes.h clean up generator code (#4191) 2018-01-02 15:26:06 +01:00
operating-system.h Bug fix/downgrade s2 2 (#5276) 2018-05-07 16:24:47 +02:00
powers.h
prime-numbers.cpp
prime-numbers.h
process-utils.cpp Feature/misc spelling corrections (#5164) 2018-07-13 13:06:20 +02:00
process-utils.h Bug fix/fixes 1910 (#3471) 2017-10-23 09:17:36 +02:00
short_alloc.h
socket-utils.cpp Bug fix/cleanup 2305 (#5437) 2018-05-23 15:45:55 +02:00
socket-utils.h
splitmix64.h Optimizations for Caches and Graph Traversals (#3169) 2017-08-31 18:33:10 +02:00
system-compiler.h added __attribute__((unused)) and other minor tweaks to silence some of the warnings (#6035) 2018-08-01 13:22:45 +02:00
system-functions.cpp Bug fix/cleanup 2305 (#5437) 2018-05-23 15:45:55 +02:00
system-functions.h
terminal-utils-posix.cpp terminal codes 2017-09-28 22:23:54 +02:00
terminal-utils-win32.cpp terminal codes 2017-09-28 22:23:54 +02:00
terminal-utils.cpp Feature/async failover (#3451) 2017-10-18 23:59:29 +02:00
terminal-utils.h terminal codes 2017-09-28 22:23:54 +02:00
threads-posix.cpp Bug fix/meierloch (#5895) 2018-07-17 11:39:50 +02:00
threads-posix.h
threads-win32.cpp Bug fix/meierloch (#5895) 2018-07-17 11:39:50 +02:00
threads-win32.h
threads.h Bug fix/scheduler delete (#3077) 2017-08-25 12:00:17 +02:00
tri-strings.cpp Bug fix/meierloch (#5895) 2018-07-17 11:39:50 +02:00
tri-strings.h Bug fix/meierloch (#5895) 2018-07-17 11:39:50 +02:00
tri-zip.cpp fix Windows ifdefs (#3824) 2017-12-06 18:43:12 +01:00
tri-zip.h
vector.cpp Bug fix/fixes 0609 (#3227) 2017-09-13 16:28:21 +02:00
vector.h Bug fix/fixes 0609 (#3227) 2017-09-13 16:28:21 +02:00
voc-errors.cpp Gharial rewrite in C++ (#5631) 2018-08-09 09:30:04 +02:00
voc-errors.h Gharial rewrite in C++ (#5631) 2018-08-09 09:30:04 +02:00
voc-mimetypes.cpp
voc-mimetypes.h
win-utils.cpp Try openssl 1.1 (#5123) 2018-06-08 13:21:31 +02:00
win-utils.h remove TRI_usleep and TRI_sleep, and use std::this_thread::sleep_for … (#3817) 2017-12-06 18:43:49 +01:00
xoroshiro128plus.h Optimizations for Caches and Graph Traversals (#3169) 2017-08-31 18:33:10 +02:00
xxhash.cpp Bug fix/cleanup after cppcheck (#3639) 2017-11-10 13:53:28 +01:00
xxhash.h