1
0
Fork 0
Commit Graph

17491 Commits

Author SHA1 Message Date
Kaveh Vahedipour 932def9cf1 [3.5] unitended multiple unlocks (#10115)
* unitended multiple unlocks

* Update CHANGELOG

* Update CHANGELOG
2019-10-01 16:37:28 +03:00
Kaveh Vahedipour 44232d856e corrected hot backup lock timings (#10075)
* corrected hot backup lock timings

* the lock timeout added to overall unlock timeout]

* Update CHANGELOG
2019-09-30 11:43:25 +03:00
Kaveh Vahedipour f15fe22c7c [3.5] coordinator proper wait for dbservers after hot restore (#10049)
* rebootIds instead of boot stamps

* noexcept is of course wrong

* wrong noexcept here. we're copying.

* change log

* Update CHANGELOG
2019-09-30 11:07:04 +03:00
Max Neunhöffer 587cead36f Use execvp instead of execv and handle error. (#10103) 2019-09-30 10:57:54 +03:00
Lars Maier 0757cf2b92 [3.5] Background Get Ids (#9786)
* Obtain new unique IDs via a background thread.

* Updated changelog.
2019-09-27 19:21:25 +03:00
Jan 451bd6e85d Bug fix 3.5/issue 10078 (#10082)
* fixed issue #10078: FULLTEXT with sort on same field not working

* added test

* simplify the implementation
2019-09-27 15:18:57 +03:00
Jan 7b427a549d fixed issue #10062: AQL: Could not extract custom attribute (#10067) 2019-09-27 15:15:39 +03:00
Max Neunhöffer b8502f8fa7 Add more strong references to pthread stuff. (#10045)
* Add more strong references to pthread stuff.

* Circumvent libgcc/libmusl mistake in multi-threaded detection.

* CHANGELOG.
2019-09-27 14:42:10 +03:00
Max Neunhöffer a08a4d3395 Fix a shutdown hanger because of a collection status lock. (#10032)
* Fix a shutdown hanger because of a collection status lock.

* CHANGELOG.
2019-09-27 14:32:42 +03:00
Dan Larkin-York 50b1f72b25 [3.5] Fix issue with cache allocation statistics. (#10029)
* Fix issue with cache allocation statistics.

* updated CHANGELOG
2019-09-27 14:31:36 +03:00
Kaveh Vahedipour 999e4b8873 [3.5] agency lock left behind (#10022)
* short timeout issue and discarded agency lock removal

* short timeout issue and discarded agency lock removal

* no hot backup in 3.5.0
2019-09-17 00:13:54 +03:00
Tobias Gödderz 0b1d5be33e Backported #9881 (#10019) 2019-09-16 17:35:42 +03:00
Tobias Gödderz 83f0d800f1 [3.5] Bug fix/sort limit rule too lax (#10018)
* Added regression test for consecutive constrained sorts

* Bugfix: sort-limit rule skipped too many node types

* Added CHANGELOG entry

* Apply sort-limit rule before single document operations
2019-09-16 13:57:23 +03:00
Matthew Von-Maszewski 249899959f back port PR 9874 to 3.5. Add write amplification stat and option to disable statistics history. (#9947) 2019-09-16 12:57:11 +03:00
Jan 351ca41553 validate collection when leasing an existing transaction (#9990)
* validate collection when leasing an existing transaction

* use WITH statement

* allow implicit read collections again

* simplify collection name validation

* re-implement it

* remove dead code

* remove unused method

* apply review comments

* whoops, deleted too many methods

* fixit
2019-09-13 20:03:55 +03:00
Tobias Gödderz aeba4bc2c6 Additional sort-limit tests (#10010) (#10011) 2019-09-13 19:10:43 +03:00
Max Neunhöffer 4656bd0a6a Fix a shutdown busy loop after main if two exceptions collide. (#9982) 2019-09-13 13:27:30 +03:00
Tobias Gödderz 6f16c3deef [3.5] Make AQL's constrained heap play nice with fullCount (#10007)
* Make AQL's constrained heap play nice with fullCount (#9981)

* Update CHANGELOG
2019-09-13 12:28:28 +03:00
Jan c9de78c7c5 backport bugfixes from this week (#9985)
* backport bugfixes from this week

* use steady_clock, after 2 votes for it
2019-09-12 17:35:57 +03:00
Jan 8830aad557 Bug fix 3.5/allow not like (#9991)
* allow NOT LIKE, NOT =~ and !~ in grammar

* updated CHANGELOG

* added derive files
2019-09-12 16:59:40 +03:00
Jan c7b0e68026 disable the creation of TTL indexes on sub-attributes (#9995)
* disable the creation of TTL indexes on sub-attributes

* updated CHANGELOG
2019-09-12 16:42:56 +03:00
Frank Celler 393ffba276 fixed wrong defines 2019-09-12 14:46:23 +02:00
Heiko 86a35e93b6 always create statistics collections & indices & fishbowl (#9967)
* Squashed commit of feature-3.5/hotbackup_devel.

This puts hotbackup into 3.5.

* Port atomic-database-creation-2 to 3.5.

* Remove some wrongly ported code.

* Fix compilation.

* Fix a manual merge error.

* Remove a feature from the mocks which does not exist in 3.5.

* Add some code which was forgotten in manual merge.

* Fix a problem introduced in a manual merge.

* reuse function

* Address some whitespace issues that came up in review

* aardvark should not create the frontend collection

* create _frontend collection from c++

* recheckAndUpdate Callback in CollectionWatcher

* Wrong author ;)

* rm outdated todo

* Update lib/Basics/VelocyPackHelper.h

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

* use logger unique id, use startup logger

* not needed

* optimized vector shardid method

* do not create _modules collection lazy anymre

* Formatting.

* Assert instead of if/TRI_ASSERT(false)

* Don't use exceptions as control structure

* Re-add READ_LOCKER that got lost in translation

* Fix audit log in case database creation fails early.

* legacy sharding

* Add CHANGELOG entry.

* Retry database cancellation indefinitely

* Do not use exceptions in UpgradeTask

* DropCollection is a FAST_LANE action and should not need much time or else retry.

* Remove superflous addition of LdapFeature

Proudly brought to you by ASAN tests

* Fixed check for distributShardsLike sharding on _system database

* Fixed compile issue on tests

* Removed assertion that seems to be not correct yet on devel.

* Sort out google cloud storage as remote. (#9918)

* Add successful method to ClusterCommResult.
* Improve error forwarding for cluster internal communication.

* Feature/hotbackup list retries (#9924)

* retry hot backup listing for 2 minutes in cluster before giving up

* Enable api by default.

* always create statistics collections & indices & fishbowl

* fix broken list of non existing id (#9957)

* Fix compilation after manual merge.

* Fix another compilation problem.

* Yet more fixes for compilation.

* More compilation fixes.

* Removed forgotten, illegal if.

* Removed obsolete include
2019-09-11 13:54:59 +03:00
Max Neunhöffer 328f46e3d6 This merges hotbackup and atomic-db-creation into 3.5. (#9968)
* Squashed commit of feature-3.5/hotbackup_devel.

This puts hotbackup into 3.5.

* Port atomic-database-creation-2 to 3.5.

* Remove some wrongly ported code.

* Fix compilation.

* Fix a manual merge error.

* Remove a feature from the mocks which does not exist in 3.5.

* Add some code which was forgotten in manual merge.

* Fix a problem introduced in a manual merge.

* reuse function

* Address some whitespace issues that came up in review

* aardvark should not create the frontend collection

* create _frontend collection from c++

* recheckAndUpdate Callback in CollectionWatcher

* Wrong author ;)

* rm outdated todo

* Update lib/Basics/VelocyPackHelper.h

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

* use logger unique id, use startup logger

* not needed

* optimized vector shardid method

* do not create _modules collection lazy anymre

* Formatting.

* Assert instead of if/TRI_ASSERT(false)

* Don't use exceptions as control structure

* Re-add READ_LOCKER that got lost in translation

* Fix audit log in case database creation fails early.

* legacy sharding

* Add CHANGELOG entry.

* Retry database cancellation indefinitely

* Do not use exceptions in UpgradeTask

* DropCollection is a FAST_LANE action and should not need much time or else retry.

* Remove superflous addition of LdapFeature

Proudly brought to you by ASAN tests

* Fixed check for distributShardsLike sharding on _system database

* Fixed compile issue on tests

* Removed assertion that seems to be not correct yet on devel.

* Sort out google cloud storage as remote. (#9918)

* Add successful method to ClusterCommResult.
* Improve error forwarding for cluster internal communication.

* Feature/hotbackup list retries (#9924)

* retry hot backup listing for 2 minutes in cluster before giving up

* Enable api by default.

* fix broken list of non existing id (#9957)

* Fix compilation after manual merge.

* Fix another compilation problem.

* Yet more fixes for compilation.

* More compilation fixes.
2019-09-11 13:13:54 +03:00
Michael Hackstein 9e76d995d0 Fixed and enabled an accidentially disabled assertion (#9970) 2019-09-11 10:10:48 +03:00
Jan 068d422d59 Bug fix 3.5/fix transaction errors (#9928)
* don't make index selectivity estimate requests fail inside cluster
transactions

* improve logging, and don't make transactions more robust

don't make transaction operations fail immediately if they cannot
acquire the transaction lock instantly. it is somewhat expected that
sometimes the garbage collection comes in-between and acquires locks
for a short amount of time - this should not lead to failures in
other operations on the transaction

* fix a race for transaction leases

* fix test failure

* moved functionality into shutdownExecute
2019-09-09 21:37:46 +03:00
Jan 949f85497c improve handling of FILTERs with constant expressions (#9942) 2019-09-09 21:35:35 +03:00
Jan ecd45a802a Harden database creation against spurious "duplicate name" errors (#9950)
that were caused by other parallel operations lazily creating required
system collections in the same database.
2019-09-09 21:34:17 +03:00
Jan 4feb615de7 handle K_SHORTEST_PATHS where it was forgotten (#9955) 2019-09-09 21:32:58 +03:00
Jan 1d92a22f76 make smart graphs transaction-aware (#9911)
* make smart graphs transaction-aware

* more debugging, fix test failure
2019-09-06 20:31:49 +03:00
Jan 7eb000fe98 avoid lookup plus sequent insert/emplace for the fast path (#9904)
* avoid lookup plus sequent insert/emplace for the fast path

additionally add transaction id and more location information to
error messages which were previously undistinguishable

* Revert "avoid lookup plus sequent insert/emplace for the fast path"

This reverts commit 11b27c338940a9fc203dbdb35713845c407a902d.

* revert most stuff, only leave improved logging there
2019-09-05 20:07:37 +03:00
Dronplane 85814c05f1 Bug fix 3.5/internal issue #633 (#9902)
* Fix for internal issue #633 (#9884)

* Made ANALYZER BOOST and MIN_MATCH non deterministic to prevent premature calls

* Returned Deterministic flag. Added context function implementation for cons arguments calls.

* Fixed filter volatility detection

* Added assertion

* Fixed formatting.  Removed redundant checks.

* Applied review suggestion

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

* Added CHANGELOG record

* Update CHANGELOG
2019-09-05 12:21:29 +03:00
Jan ac221ae1b8 fix audit test (#9887)
* fix audit test

* fix compile error in community version

* try to harden view test
2019-09-04 19:24:25 +03:00
Kaveh Vahedipour 8e04c84380 [3.5] drop collection action timeout (#9894)
* DropCollection is a FAST_LANE action and should not need much time or else retry.

* DropCollection is a FAST_LANE action and should not need much time or else retry.

* Update CHANGELOG
2019-09-04 18:52:29 +03:00
Jan 2fe0527d25 check for duplicate server endpoints on cluster startup (#9863)
* check for duplicate server endpoints on cluster startup

* Update arangod/Cluster/ServerState.cpp
2019-09-03 11:49:08 +03:00
Jan f8c156a44f make graphs transaction-aware (#9855)
* make graphs transaction-aware

* simranification

* fix tests with mmfiles
2019-09-02 22:06:10 +03:00
Kaveh Vahedipour 10d99b20cb url should be deleted not path (#9882) 2019-09-02 16:41:33 +03:00
Jan 479e2ab5da don't issue a warning when transaction log iterator reports more data (#9869) 2019-09-02 11:29:00 +03:00
Jan 480f0e799a Bug fix 3.5/babies unknown shard (#9871)
* fixing cluster

* added tests for baby operations with custom sharding

* added errorMessage for UX

* updated CHANGELOG

* updated CHANGELOG

* fix error code handling
2019-09-02 10:58:25 +03:00
Jan ad1e5d2e51 fixed issue #9862 (#9865) 2019-08-30 19:31:55 +03:00
Heiko e40d7fadd1 Bug fix 3.5/graph create orphan collection properly (#9842)
* added ensureCollections to orphan create method

* do not move anymore

* rm trx finish. will be handled automatically in error case

* changelog
2019-08-30 13:55:08 +03:00
Jan 2123fceb7a cover more cases of "unique constraint violated" issues during replication (#9829)
* cover more cases of "unique constraint violated" issues during
replication

* add more testing

* fix compile error
2019-08-30 12:42:58 +03:00
Jan d2efc6cea8 fix return value when reboot id cannot be retrieved (#9858) 2019-08-30 12:26:00 +03:00
Max Neunhöffer 0599a1c79c
Fix unneeded return code. (#9853) 2019-08-30 08:44:07 +02:00
Kaveh Vahedipour 139c5d3839 [3.5] agency lockup when removing 404ed callbacks and leadership preparation (#9846)
* queue the write
* finishing 3.5
* commenting
2019-08-29 14:32:48 +02:00
Dronplane 1eef617a07 Fixed issue #9795 Fixed NOT IN clause in ArangoSearch (#9836)
* Fixed issue #9795 Fixed NOT IN clause in ArangoSearch

* Update CHANGELOG
2019-08-28 18:38:02 +03:00
Dan Larkin-York 7aea108197 [3.5] Minimize unnecessary dropping of followers due to poorly set synchronous replication timeouts (#9810)
* Minimize unnecessary dropping of followers due to poorly set synchronous replication timeouts.

* Add changelog entry.

* Add setIntroducedIn versions.
2019-08-28 14:07:33 +03:00
Jan 226373e200 Bug fix 3.5/fix in not in workaround (#9814)
* remove hack for NOT IN

* added parsing test

* added derived files

* added CHANGELOG entry
2019-08-28 14:04:24 +03:00
Jan bc1df0e78d adjust log level for "closing stream" message (#9815) 2019-08-27 16:51:25 +03:00
Frank Celler 35e307934c use LDAP_PATH instead of fixed one (#9812) 2019-08-27 10:20:56 +02:00
Jan Christoph Uhde 44ab3f04b5 3.5 -- intermediate commit stats (#9780)
* count intermediate commits

add transactions statistics struct

add tests

put values in object / split test is multiple smaller tests

* fix broken condition

* fix test

* remove print

* fix windows build

* fix mmfiles

* fix cluster

* add structs in docublocks

* we do not know about intermediate commits on coordinators

* add documentation

* add isCluster function

* add serverStatistics to 3.5 client

* update documentation
2019-08-26 16:56:21 +03:00
Jan 6d53c1e02f Feature 3.5/curl 7.65.3 (#9790)
* upgrade curl to 7.65.3

* re-add modifications to curl

* remove curl 7.63.0

* update LICENSES file

* fix error handling
2019-08-26 15:54:42 +03:00
Jan 4a749a66b3 Bug fix 3.5/multi bugs (#9792)
* add missing whitespace to make error message readable

* try to continue running scheduler threads even when there are exceptions

* give up trying to persist follower info in agency for already dropped collections.

* updated CHANGELOG
2019-08-26 15:51:14 +03:00
Jan 3c5b755d35 remove now-obsolete warning (#9802) 2019-08-26 14:26:56 +03:00
Dan Larkin-York a9dced45ee Add user restrictions for streaming transactions. (#9796) 2019-08-23 19:51:59 +03:00
Kaveh Vahedipour 09d2745625 [3.5] clean up your crap, dbservers. alright, i'll do it. (#9722)
* clean up your crap, dbservers. alright, i'll do it.

* ts ts ts

* body is shared_ptr

* Update CHANGELOG

* revert callback bodies to API specification

* array needs be inside so that multiple unobserves to same key are possible
2019-08-22 14:26:44 +03:00
Dronplane 5bee042b65 Bug fix 3.5/internal issue #622 (#9787)
* Bug fix/internal issue #622 (#9781)

* Added analyzer cache invalidation for dropped database

* Fixed jslint reported errors

* Update CHANGELOG
2019-08-22 14:25:14 +03:00
Jan 3592af0b79 Bug fix 3.5/mark fulltext near etc as cacheable (#9772)
* mark AQL functions FULLTEXT, NEAR, WITHIN, WITHIN_RECTANGLE as cacheable

* updated CHANGELOG
2019-08-21 19:08:15 +03:00
Dronplane 2c72655dd5 Bug fix 3.5/issue #9612 (#9778)
* 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

* Update CHANGELOG

* Update CHANGELOG
2019-08-21 17:59:59 +03:00
Andrey Abramov 35e2ebc729 bug-fix/internal-issue-#591 (#9639) (#9779)
* update iresearch

* update iresearch

* fix compilation errors

* update iresearch
2019-08-21 17:55:24 +03:00
Jan 5a20828210 fix potential spurious wakeups in scheduler code (#9777)
* fix potential spurious wakeups in scheduler code

* added CHANGELOG entry
2019-08-21 13:10:05 +03:00
Jan 70c31da560 port change from devel by @danielhlarkin (#9773) 2019-08-21 13:07:43 +03:00
Simon bd5df4d49e Enforce stricter transaction limits (#9740) (#9775)
* Enforce stricter transaction limits (#9740)

* changelog

* make CHANGELOG entry more verbose
2019-08-21 13:07:17 +03:00
Dan Larkin-York 663212ba19 [3.5] Check scheduler queue return value (#9759)
* Add to cmake.

* Backport changes from devel.

* added CHANGELOG entry, port adjustments from devel
2019-08-20 12:57:51 +03:00
Jan 3dcc293224 make index selection more deterministic (#9736)
* make index selection more deterministic

* updated CHANGELOG

* 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 12:55:21 +03:00
Jan 0f03655ce3 issue #9654: make `--rocksdb.max-write-buffer-number` work (#9751)
* issue #9654: make `--rocksdb.max-write-buffer-number` work

* fix the logic
2019-08-20 12:54:24 +03:00
Lars Maier 87ae6165d7 [3.5] Move Shard Bug 4567124 (#9747)
* Fixed abort in moveshard in the case new leader is not in Current.

* Fixed special case + updated changelog.

* Update CHANGELOG
2019-08-19 19:23:12 +03:00
Dronplane 5effbfd35a Porting fix for issue #9652 (#9727)
* Porting fix for issue #9652

* Update CHANGELOG
2019-08-16 13:27:51 +03:00
Max Neunhöffer b753c895e4
Fix an agency bug found in Windows tests. (#9728)
* Fix agency bug found in Windows tests.
* CHANGELOG.
2019-08-16 12:17:09 +02:00
KVS85 e64080e207
Merge 3.5.1 back to 3.5 (#9713)
* Bug fix 3.5/make arangosh reconnect (#9615)

* make arangosh reconnect

* added CHANGELOG entry

* fix lagging AgencyCallbacks (#9620)

* fix lagging AgencyCallbacks

* optimizations, discussed with @mchacki

* fix wording

* updated CHANGELOG

* fix yet another undefined behavior (#9629)

* [3.5.1] Fail the FailedLeader Job if the new leader fails. (#9628)

* Fail the FailedLeader Job if the new leader fails.

* Updated changelog.

* In case of timeout do not rollback.

* Fixed catch tests.

* Changed wording.

* DELETED rollback.

* reduce wait timeouts as a mitigation for notifying waiters without ho… (#9619)

* reduce wait timeouts as a mitigation for notifying waiters without holding the required mutex

this is a quick mitigation only, which reduces maximum wait time from 1
second to 100 milliseconds without changing other behavior.

the main problem of notifying pending writers without successfully
acquiring the required mutex still needs proper addressing.

* adjust timing-dependent test

* [3.5.1] Fast Controlled Leaderchange (#9634)

* First draft of keeping in sync during controlled leader change.

* Test if server is actually the leader in plan.

* Updated changelog.

* Added oldLeader check for set-the-leader request.

* Small fixes.

* Removed LOG_DEVEL.

* less copying, more moving! 🚚 (#9645)

* attempt to fix load_balancing tests in slow test environments (#9626)

* Bug fix/fix swagger datatype (#9045) (#9602)

* Bug fix/fix swagger datatype (#9045)

* remove http so https arangos will work

* verify that query parameters are proper swagger data types, fix offending documentation files

* return the actual type - not the list of available ones

* check formats

* there is no uint64 in swagger

* Fresh Swagger

* Port TakeoverShardLeadership from devel to 3.5.1 (#9659)

* Create TakeoverShardLeader job.
* Add TakeoverShardLeadership to Action factory.
* Add log message at level debug.
* Sort out LOG_TOPIC ids.
* Fix unit tests.
* CHANGELOG.

* Bug fix 3.5/hide mmfiles specific info in web ui (#9668)

* attempt to fix load_balancing tests in slow test environments (#9626)

* Bug fix/fix swagger datatype (#9045) (#9602)

* Bug fix/fix swagger datatype (#9045)

* remove http so https arangos will work

* verify that query parameters are proper swagger data types, fix offending documentation files

* return the actual type - not the list of available ones

* check formats

* there is no uint64 in swagger

* Fresh Swagger

* hide MMFiles-specific information when we don't need it

* Ported ResignLeadership to 3.5 (#9656)

* attempt to fix load_balancing tests in slow test environments (#9626)

* Bug fix/fix swagger datatype (#9045) (#9602)

* Bug fix/fix swagger datatype (#9045)

* remove http so https arangos will work

* verify that query parameters are proper swagger data types, fix offending documentation files

* return the actual type - not the list of available ones

* check formats

* there is no uint64 in swagger

* Fresh Swagger

* Ported ResignLeadership to 3.5

* Add the actual http route.

* Aardvark: Add k Shortest Paths example graph to UI (#9491) (#9661)

* 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

* Regenerate UI

* add the ability to have cluster special examples (#9613) (#9663)

* add the ability to have cluster special examples

* Update get_cluster_health.md

* fix abort condition, fix negative filtering for cluster tests

* Test if job fails with unmet assertion

* Remove cluster test example

* germanize

* better skip reasons

* removing superfluous semicolons

* Revert skip reasons, too noisy

* various replication improvements: (#9675)

* attempt to fix load_balancing tests in slow test environments (#9626)

* Bug fix/fix swagger datatype (#9045) (#9602)

* Bug fix/fix swagger datatype (#9045)

* remove http so https arangos will work

* verify that query parameters are proper swagger data types, fix offending documentation files

* return the actual type - not the list of available ones

* check formats

* there is no uint64 in swagger

* Fresh Swagger

* various replication improvements:

- better debuggability (more log details)
- shorter minimum wait delay in active failover
- fixed too early pruning of WAL files on leaders

* Bug fix 3.5/fix rocksdb return code (#9692)

* attempt to fix load_balancing tests in slow test environments (#9626)

* Bug fix/fix swagger datatype (#9045) (#9602)

* Bug fix/fix swagger datatype (#9045)

* remove http so https arangos will work

* verify that query parameters are proper swagger data types, fix offending documentation files

* return the actual type - not the list of available ones

* check formats

* there is no uint64 in swagger

* Fresh Swagger

* fix return codes for concurrent writes to same documents

* [3.5] Feature/rebootid notice changes, backport of #9523 (#9684)

* Feature/rebootid notice changes, backport of #9523

* Fixed error code to not re-use an old one

* Bug fix 3.5/issue 9679 (#9682)

* attempt to fix load_balancing tests in slow test environments (#9626)

* Bug fix/fix swagger datatype (#9045) (#9602)

* Bug fix/fix swagger datatype (#9045)

* remove http so https arangos will work

* verify that query parameters are proper swagger data types, fix offending documentation files

* return the actual type - not the list of available ones

* check formats

* there is no uint64 in swagger

* Fresh Swagger

* fixed issue #9679

* bug-fix/issue-#9660 (#9704) (#9707)

* 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

* Update CHANGELOG

* [3.5] agency node fixes (#9698)

* node fixes port from 3.4
* fixed change log

* update rocksdb statistics to deliver sums from column family instead of single value from default family. (#9706)

* Feature 3.5/geo functions (#9710)

* Add support for WGS84 on distances (#9672)

* Add area calculations (#9693)

* Update CHANGELOG
2019-08-14 20:24:47 +03:00
KVS85 40c27d283e
Bug fix 3.5/fix view creation errors (#9599)
* Fix ArangoSearch view creation errors

* Fix another error
2019-07-29 20:41:51 +03:00
Jan Christoph Uhde f995c46b71 nested collect backport 3.5 (#9587)
* stop optimization for nested collects (#9484)

* Update CHANGELOG
2019-07-29 16:57:29 +03:00
Jan 7813c76f32 Bug fix 3.5/fix replication failures (#9591)
* fix wrong string constant

* fix load balancing tests for mmfiles

* remove print

* try to fix mmfiles test
2019-07-29 16:32:08 +03:00
Wilfried Goesgens 8d2accac7c don't keep the memory stats in the collections to save disk space (#9582) 2019-07-26 23:51:47 +03:00
Wilfried Goesgens 18748882d8 Feature 3.5/add js isolate mem statistics (#9569)
* add statistics about isolate memory usage, add isolate numbers to logs

* add statistics about isolate memory usage, add isolate numbers to logs

* add documentation

* Update Documentation/DocuBlocks/Rest/Administration/get_admin_statistics.md

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

* Update arangod/Statistics/Descriptions.cpp

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

* Update arangod/Statistics/StatisticsWorker.cpp

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

* Update lib/ApplicationFeatures/V8PlatformFeature.cpp

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

* Update lib/V8/v8-globals.h

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

* Update arangod/Statistics/Descriptions.cpp

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

* fix time handling as sugested by @jsteemann

* cleanup

* Update Documentation/DocuBlocks/Rest/Administration/get_admin_statistics.md

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

* Update Documentation/DocuBlocks/Rest/Administration/get_admin_statistics.md

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

* Update arangod/Statistics/StatisticsWorker.cpp

Co-Authored-By: Jan <jsteemann@users.noreply.github.com>
2019-07-26 16:36:20 +03:00
Jan 9777f53878 Bug fix 3.5/add db list transactions function (#9575)
* added missing function db._transactions(), and equivalent REST API route
GET /_api/transaction

* updated

* use performRequests

* updated CHANGELOG

* added tests, fixed segfault

* use throwNotRunning

* use read transactions for testing (mmfiles blocks with multiple write
transactions on the same collection)
2019-07-26 16:34:57 +03:00
Jan c2c6fcb52c fixed a bug in RTRIM implementation, fixed issue #9558 (#9563) 2019-07-25 15:57:33 +03:00
Jan 0a2c9359ac Added startup error for bad temporary directory setting. (#9551)
* 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).

* fix failing tests
2019-07-24 13:49:48 +03:00
Andrey Abramov 8913dd4062 Bug fix/iresearch trx (#9536) (#9549)
* 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 18:43:18 +03:00
Jan d2b01a4c5e Bug fix 3.5/make ttl indexes behave like others (#9547)
* 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.

* added tests

* updated CHANGELOG
2019-07-23 15:46:50 +03:00
Jan 2209d568d0 fix undefined behavior in Scheduler calculations (#9538) 2019-07-22 19:14:16 +03:00
Michael Hackstein d5840c125a 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
2019-07-22 17:48:34 +03:00
Jan 313d60e656 Bug fix 3.5/fix smart join restrictions (#9534)
* fixed a query abort error with smart joins if both collections were
restricted to a single shard using the "restrict-to-single-shard"
optimizer rule

* updated CHANGELOG

* try to fix Windows build error
2019-07-22 15:52:08 +03:00
Jan 9b62f07478 move deleting of ClusterComm threads to the unprepare of the ClusterFeature (#9369) (#9525) 2019-07-22 10:50:37 +03:00
Andrey Abramov 8c74c16dbc properly handle removals during recovery (#9528) (#9529) 2019-07-21 16:20:02 +03:00
Andrey Abramov be88d8d499 bug-fix/internal-issue-#609 (#9464) (#9520)
* 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

# Conflicts:
#	arangod/IResearch/IResearchLink.cpp
2019-07-19 14:01:33 +03:00
Tobias Gödderz 7e6b6fbed7 Bug fix 3.5/count collect should skip (#9512)
* Make CountCollectExecutor skip rather than fetch

* Cleanup, fix and test for top-level variables

* Added CHANGELOG entry and tests
2019-07-19 00:47:26 +03:00
Jan 47d7f9e3e2 Bug fix 3.5/fix uninitialized value (#9515)
* fix uninitialized time point value, which led to potential bogus error
messages

* fix typo in info message
2019-07-18 23:26:51 +03:00
Tobias Gödderz 87e5fe7dd2 Bug fix 3.5/clean replication api wal tracking (#9503)
* Use int type for server id

Change serverId to an int

Pass syncerId only for synchronous replication

Added UrlBuilder

structs to classes, reordering

Added Location class, cleanup

Fixed initialization order

Use Location class

Use string for large ints

Documentation

Added clientInfo to ReplicationClientProgressTracker and corresponding rest handlers

Pass clientInfo string in sync replication

Pass clientInfo in addFollower, too

Updated docu

Renamed UrlBuilder to UrlHelper

Updated docu

Try to fix compile error on windows

Fixed a bug and a test

* Implemented @jsteeman's comments
2019-07-18 19:38:31 +03:00
Jan 2185cb7309 fix races in cluster collection creation, fix return codes of collection deletion (#9505)
* fix races in cluster collection creation, fix return codes of collection deletion

* honor review comments (partially)

* produce agency dumps only in maintainer mode

* fix unit test failures
2019-07-18 18:33:08 +03:00
Jan e59a68be54 retry (#9480) 2019-07-17 11:01:25 +03:00
Simon 1432156e91 Port changes to fix the keep alive timeout (#9483) 2019-07-16 19:39:40 +03:00
Matthew Von-Maszewski 02d1a17700 BugFix 3.5: Some error results have messages that are not reporting (#9463)
* coordinator would not always include rocksdb error message with error code

* Fix changelog
2019-07-11 23:06:23 +03:00
Frank Celler 2beb731264 Merge branch 'devel' of github.com:arangodb/arangodb into 3.5 2019-07-11 15:22:32 +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
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
Jan 25bc8c5343 remove bogus warnings about statistics thread (#9446) 2019-07-10 14:12:11 +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