1
0
Fork 0
Commit Graph

1401 Commits

Author SHA1 Message Date
Simon 877c9d9eb3 Do not load counters until recovey is done (#6719) 2018-10-05 12:52:00 +02:00
Jan 3414825696
Feature/improvements 031018 (#6712) 2018-10-04 15:10:54 +02:00
jsteemann 56147843c2 Merge branch 'feature/additional-logging' of https://github.com/arangodb/arangodb into devel 2018-10-02 17:53:31 +02:00
Dan Larkin-York 302f6d1852 Fix compile mistakes. 2018-10-02 08:55:49 -04:00
Dan Larkin-York 44600636e7 Cleanup logging in RocksDBEngine. 2018-10-02 07:50:02 -04:00
Jan 9ba875989b
added yet another missing RangeDelete implementation (#6676) 2018-10-02 09:53:39 +02:00
Simon 806d56389c Use SingleDelete where possible (#6660) 2018-10-01 18:22:20 +02:00
jsteemann 785d2b876a one more attempt 2018-09-28 18:13:47 +02:00
jsteemann 7fcf497234 fix compilation with g++5.4 2018-09-28 17:31:31 +02:00
Jan 55cd434aa2
fix handling of range deletions (#6639) 2018-09-28 11:09:41 +02:00
Jan 4b2a6d430b
fix assertion failure with _numLogData (#6633) 2018-09-27 19:26:16 +02:00
Jan ae85fbc4ea
much better diagnostics for AQL query results cache (#6580) 2018-09-25 09:49:11 +02:00
Jan 44448321e1
Bug fix/optimizations 210918 (#6573) 2018-09-24 20:16:16 +02:00
Jan 024a9d7ac1
less RocksDB background thread activity in case there is nothing to do (#6577) 2018-09-24 13:45:13 +02:00
Simon 0fa7f01c66 Resilience test failure points (#6539) 2018-09-20 01:05:10 +02:00
Jan 380bb71192
add rocksdb::PinnableSlice for some key lookups (#6530) 2018-09-19 23:33:53 +02:00
Jan 203b141a6f
Bug fix/fix stats on skip (#6531) 2018-09-19 22:02:32 +02:00
Jan c38051519e
Bug fix/simplify things (#6516) 2018-09-18 17:47:01 +02:00
Simon 611e4a7010 Use physical collection directly (#6526) 2018-09-18 14:55:58 +02:00
Jan 45f2110cfe
take over selectivity estimates (#6505) 2018-09-17 16:41:32 +02:00
Jan 6be6188fd5
make cid values in /_api/replication/logger-follow strings as advertised (#6499) 2018-09-14 14:20:44 +02:00
Jan 1af568b099
less dynamic memory allocations on index operations (#6497) 2018-09-14 13:13:02 +02:00
Dan Larkin-York 0dfabd8f04 Fix several TSan warnings (#6473) 2018-09-14 11:16:45 +02:00
Simon 7ec493854b minor issues (#6471) 2018-09-12 20:28:45 +02:00
jsteemann f1456a45db added comments 2018-09-12 17:48:30 +02:00
Jan d1241b1deb
Bug fix/aql modify cleanup (#6380) 2018-09-11 08:54:45 +02:00
Jan 942ecdcf5d
do not create empty useless transaction data objects (#6430)
in the storage engines that do not need them
  the only engine using these objects is MMFiles. the other engines
  can get away with not creating these objects
2018-09-10 14:47:05 +02:00
jsteemann 38156d4f44 remove unused variables 2018-09-10 10:33:18 +02:00
Vasiliy 5329f34771 issue 465.2.2: remove redudnant heap allocations and simplify API (#6349)
* issue 465.2.2: remove redudnant heap allocations and simplify API

* address merge issue

* address more merge issues

* address more merge issues

* address review comments

* do not deallocate non-allocated instances
2018-09-05 13:37:37 +03:00
Simon 0661a4c1fe Hide Links from getIndexes() (#6325) 2018-09-03 15:17:24 +02:00
Jan cb19878fad more explicit order for SystemDatabaseFeature (#6335) 2018-09-01 22:54:03 +02:00
Jan 840ad8c20d
added option `--rocksdb.use-file-logging` (#6308) 2018-08-31 17:23:00 +02:00
Jan 5022ccc24d
Bug fix/fixes 2508 (#6254) 2018-08-27 21:36:39 +02:00
Jan 601e2ccbc6
Feature/aql 1808 (#6191) 2018-08-27 14:56:57 +02:00
Jan 791eaba873 Bug fix/planning 2865 (#6252)
* potential bugfix for planning/#2865

* speed up dump tests setup

* enable authentication for backup tests

* make arangodump provide a "serverId" to the server

this allows the server to track arangodump as an active dump client
so any data required for the dumping may be retained while the
dump is ongoing

* don't log binary stuff into the logfile
2018-08-27 10:21:34 +02:00
Simon 568a09f177 Disable JS on DBServer, fix race in UserManager (#6244) 2018-08-24 22:20:49 +02:00
Jan 0d48677619
Bug fix/aql optimizer improvements 2308 (#6241) 2018-08-24 13:42:22 +02:00
Simon 948820e484 Various small changes (#6234) 2018-08-24 09:39:03 +02:00
Jan 5f0403ed1c
Bug fix/add aql collection count cache (#6227) 2018-08-23 16:05:51 +02:00
Simon Grätzer 73640d6b7c Merge branch 'devel' of github.com:arangodb/arangodb into bug-fix/add-arangosearch-view-to-resilience-tests
# Conflicts:
#	3rdParty/fuerte/src/HttpConnection.cpp
2018-08-22 14:54:26 +02:00
Simon Grätzer c3d950f1d6 fix shard move 2018-08-22 12:42:57 +02:00
jsteemann 9e1e6c20e2 preparations for some more index usage 2018-08-22 09:53:33 +02:00
Jan e5864838d5
use rocksdb::Transaction::PopSavePoint() (#6192)
this prevents stacking many useless SavePoints in transactions with
many operations.

The PopSavePoint method in RocksDB is forward-ported from upstream
RocksDB commit 90f744941d48f15d5d070dfcab5d51b77abac8ad.
This is likely to be released with a future release of RocksDB.
2018-08-20 12:13:26 +02:00
Jan a5ef080a8a
attempt to make replication_sync more reliable in tests for MMFiles (#6184) 2018-08-17 14:20:40 +02:00
Jan d7e631eddf
Bug fix/more sparsung (#6177) 2018-08-17 08:47:45 +02:00
Jan d78adb7ae1
Bug fix/turn off range deletes in cluster (#6178) 2018-08-17 08:41:00 +02:00
Simon 392118bd62 Use RangeDelete where possible (#6121) 2018-08-15 18:52:09 +02:00
Vasiliy 6fd541d110 issue 427.5: use ApplicationServer reference instead of pointer (#6145)
* issue 427.5: use ApplicationServer reference instead of pointer

* address MSVC build failure
2018-08-15 12:16:02 +03:00
Simon 606c15ce48 VST support in arangosh (#6047) 2018-08-08 12:18:54 +02:00
Vasiliy a46122efde issue 427.2: ensure the underlying error is properly propagated up (#6100) 2018-08-07 15:22:04 +02:00
Simon 4238cff3ff Adding cacheUsage property and tests (#6075)
* Adding cacheUsage property and tests

* Make cacheUsage more permissible
2018-08-06 14:55:20 +02:00
Simon Grätzer 7ac0a70bc7 add cache stats to collection figures 2018-08-03 18:21:11 +02:00
Jan b278d6874a
allow master & slave to work in parallel for RocksDB WAL tailing (#6059) 2018-08-03 13:37:53 +02:00
Simon a79c8af310 fix non-blocking stream cursors (#6064) 2018-08-03 12:41:52 +02:00
Simon 42cabb858a Fix dumping of views in the cluster (#6024) 2018-08-02 17:25:49 +02:00
Simon Grätzer a7c78a3f37 Merge branch 'devel' of github.com:arangodb/arangodb into bug-fix/improve-intermediate-commits
# Conflicts:
#	arangod/RocksDBEngine/RocksDBIncrementalSync.cpp
#	arangod/RocksDBEngine/RocksDBIterators.cpp
2018-07-31 15:19:57 +02:00
Jan 2a416f2e33
Bug fix/3007 (#6019) 2018-07-30 17:16:47 +02:00
Simon Grätzer 6b776e7e9e Merge branch 'devel' of github.com:arangodb/arangodb into bug-fix/improve-intermediate-commits 2018-07-30 14:53:39 +02:00
Matthew Von-Maszewski 9f880dd529 (devel) add bool option rocksdb.debug-logging to easily enable rocksdb logging (#6016) 2018-07-30 14:30:20 +02:00
Simon Grätzer 9d979efbd6 remove redundant test 2018-07-27 18:22:24 +02:00
Simon Grätzer 1cfb328bcc fix intermediate commits 2018-07-27 17:40:38 +02:00
Jan 1f16898027
added more RocksDB options and stats (#6006) 2018-07-26 16:48:25 +02:00
Jan 21023945ba
disable RocksDB background syncing on Windows (#6004) 2018-07-26 16:48:11 +02:00
Vasiliy 62ca1235ac issue 430.3: remove redundant constructor from SingleCollectionTransaction (#5996) 2018-07-26 16:54:53 +03:00
Simon 2dd8593609 View Replication (#5915) 2018-07-26 10:28:46 +02:00
Jan 21064144c8
Bug fix/replication improvements (#5962) 2018-07-25 09:04:50 +02:00
Jan a5bb50b0bf
remove methods from VelocyPackHelper that are also in VPackSlice (#5946) 2018-07-25 09:01:29 +02:00
Vasiliy 08d3cb3802 issue 399.4: use LogicalCollection& instead of LogicalCollection* in Index (#5929)
* issue 399.4: use LogicalCollection& instead of LogicalCollection* in Index

* backport: address enterprise build issues
2018-07-20 14:55:58 +03:00
Simon a13ec34053 keep replication batches alive for longer (#5932)
*  keep replication batches alive for longer

* latest changes
2018-07-20 11:17:20 +02:00
jsteemann e457189abb removed unneeded declaration 2018-07-19 22:40:47 +02:00
jsteemann c2ad0dd0f5 add comment 2018-07-19 15:58:52 +02:00
Jan 1a128799f2
finalize `--rocksdb.sync-interval` feature (#5856) 2018-07-17 11:09:57 +02:00
jsteemann 44c7b1b476 remove tabstops 2018-07-16 15:00:12 +02:00
Michael Hackstein 7a95c5e675
Feature/feature phases (#5272)
* Added feature phases

* BasicsPhase and DatabasePhase to the required files. Server now has Feature circles and does not boot. Will be sorted out later on.

* Added ClusterPhase to features

* Added V8Phase to the required features

* Added AQLPhase to the affected features

* Added ServerPhase to Features

* Added FoxxPhase to the relevant features

* Added AgencyPhase to the relevant features

* Moved registration from local variable SYS_SYSTEM_REPLICATION_FACTOR from cluster to V8 as their ordering is now vice versa

* Moved Bootstrap feature into FoxxPhase. It could be moved to ServerPhase easily if the FoxxQueue dependency would be removed

* Final movement of Startup Phases. Now solved all circles.

* Removed merge conflict

* Moved ReplicationTimeout into cluster phase and fixed cross-phase requirements

* Added greetings phase. This phase separates the Basics Phase and is the first to be run. Includes Logger and Hello/Goodbye

* Added the GreetingsPhase in the corresponding features. Now all BasicsPhase features start after greetings Phase. There is some issue in this branch which prevents the Agency from Gossipping right now. Will be fixed next

* Moved creation of the Agent into the prepare phase of the feature. THereby it is guaranteed that agents at least exists before the GeneralServer is activating endpoints

* Recovery needs to be started after the ServerID

* Moved log output of FeaturePhases to DEBUG instead of ERROR.

* Added feature phases for clients

* ClusterFeature now does not directly require AgencyFeature any more

* Added requirement of TravEngineRegistryFeature in AQL feature. Otherwise shutdown may be undefined

* The ApplicationServer can now handout the list of ordered features. Used for testing purposes

* Fixed IResearchVew Tests Setup to honor new feature ordering

* Fixed IResearchViewDBServer Tests Setup to honor new feature ordering

* Started fixing IResearchView Coordinator tests with startup ordering. Not finished yet

* Added startup phases to ViewCoordinator test

* Disabled expected logoutput in ClusterRepairsTest

* Fixed indention in test code

* LinkCoordinator now honors startup ordering

* Link meta now honors startup rdering

* Supress expected cluster logs in ViewTest

* Removed '#' accidentially added.
2018-07-16 14:09:36 +02:00
Jan 7fb985d573
Bug fix/fix codescan issues (#5872) 2018-07-16 10:58:14 +02:00
Jan e8e7358a79
use ExecutionNode::castTo (#5875) 2018-07-13 20:09:16 +02:00
Vasiliy 1240090cd8 issue 399.2: use a LogicalCollection& instead of LogicalCollection* in PhysicalCollection (#5861) 2018-07-13 15:02:43 +03:00
Simran 34ec56d421 Feature/misc spelling corrections (#5164) 2018-07-13 13:06:20 +02:00
Matthew Von-Maszewski 97a16116f6 Bugfix Devel: adjust SetThrottle() to only call GetDelayToken() first time. (#5857)
* adjust SetThrottle() to only call GetDelayToken() first time.  Each call disrupts throttle timing.

* add ChangeLog entry
2018-07-12 20:01:58 +02:00
Tobias Gödderz fc3e11dbbc Async AQL (#5806)
* Modified header to new initializeCursor API

* Adapted initializeCursor to DONE/WAITING API. Compiles but not tested and no one reacts to WAITING state, it is not returned anywhere yet

* Subqueries now expect a WAITING return from initilize cursor. However they will just return a nullptr and pretend the query is empty, this will be fixed later

* First attempt to simulate thread waiting over information within the query

* Small fix to allow for isDirect handlers to go to sleep.

* Waiting in the necessary places now for the async request to be send.

* Thank you auto-casting compiler, you are totally right i absolutely wanted to use this bool value as an index in may Array. How could i possibly not want to use it here?

* Include cond-var header

* Fixed mutex/cond_var usage

* Added oldAPI wrappers in AQL Blocks for get/skip some variants. This Commit compiles but is NOT tested

* Let getSome now return unique_ptr of AqlItemsBlocks. Also implemented the async variant of getSome in subqueries.

* Removed all references to OLD implementations in AQL. only the base wrappers are allowed to call OLD functions from now on. Now the testing part starts

* Fixed endless virtual recursion

* Implemented new getOrSkip API in SortBlock

* Implemented new getOrSkip API in LimitBlock

* Initilaize all variables

* Fixed logic bug in SubqueryBlock

* getBlock in ExecutionBlock now returns a state. All blocks need to handle this properly!

* Createad a wrapper getBlockOld that servers the old sync api and is used now in AQL. To be replaced overtime.

* Added IndexBlock::skipSome and IndexBlock::getSome

* getBlock now returns its old return value along with the state

* Switch from getBlockOld to getBlock in IndexBlock::skipSome

* Switch from getBlockOld to getBlock in IndexBlock::getSome

* ShortestPathBlock::skipSome is not implemented! Added a regression test

* Attempt to fix SubQueryResult memory management

* Fixed LIMIT Block

* Moved from ShortestPathBlock::getSomeOld to ::getSome

* Implemented ASYNC api on SingletonBlock

* Adapted EnumerateCollectionBlock to new async API

* Fixed FilterBlock and adapted return block to async API

* Adapted NORESULTS block to async AQL api.

* Adapted Modification Blocks to async API

* Fixed some initialize cursor functions to reset values required during get/skipSome

* First steps to adapt ClusterNodes to Async AQL api. Not there yet, need to implement the core still

* Added asnyc implementation for xxxForShard in ClusterBlocks. This commit changes internal logic of _doneForShard. Needs additional testing as soon as everything is in place.

* Adapted CalculationBlock to async API

* Adapted TraversalBlocks to ASYNC Aql. This is not optimal yet, we need a better decission if we are DONE or not on RETURN

* Adapted EnumerateListBlock to Async AQL api

* Adapted RemoteBlock to ASYNC API in getSome/skipSome. The whole thing is now LIVE in the cluster. Exetensive testing to be started now

* Fixed IndexBlock WAITING behaviour if Waiting occurs during a index processing

* Adapted IReasearchViewBlock to ASYNC AQL API

* Fixed SortingGatherBlock in WAITING state.

* Adapted IResearch ExecutionBlockMock to Async API

* Unified the HASMORE/DONE distinction. Code is much more readable now and harder to get incorrect 👍

* Implemented tonly heoretically reachable function of non void function.

* Fixed last commit

* Added inline TODO comments

* fix warning

* Fixed a clearing logic bug in RemoveNodes

* Fixed Error Handling in RemoteBlocks. Also fixed a logic bug (true/false simply has a 50% chance of getting it wrong) in Distribute and Scatter.

* remove unused methods

* Fixed failure test

* implement skipping

* Moved the Query Waiting out of the ExecutionEngine.

* changed one of the collect blocks

* Removed _upstreamState from ExecutionBlockMock, that is in the base-class now

* Added a Test Mock for a an ExecutionBlock that simulates the WAITING/HASMORE/DONE api.

* do not check "hasMore" if not necessary

* Added DistinctCollectBlock::getOrSkipSome from ~Old and changed its return type

(still uses getBlockOld)

* Save state to resume in DistinctCollectBlock::getOrSkipSome

* Extracted redundant code

* fixed some ops

* added one more test

* fix endless blocking

* fix compile error

* fix test

* Refactored HashedCollectBlock::getOrSkipSome

* Return blocks to the manager

* Replaced usage of getBlockOld in HashedCollectBlock::getOrSkipSome

* remove unused shutdown calls, simplify ownership for expressions

* Removed superfluous variable

* Capture const variable by value

* Removed SortedCollectBlock::getOrSkipSomeOld in favour of getOrSkipSome

* Added a working version of SortedCollectBlock::getOrSkipSome

Has yet to be cleaned up

* Removed isTotalAggregation special treatment

* On no input, return a group of nulls (instead of no group at all)

* Bugfixes

* Simplified code

* Move return to the end, eliminate duplicate code

* Corrected skipped count in HashedCollectBlock

* Aligned getNextRow() implementations

* Added comments

* some cleanup

* fix potential memleak

* Bugfix

* Fixed failure tests

* Removed usage of getBlockOld in ExecutionBlock::getOrSkipSome

* Replaced hasMore with an async implementation (mostly)

* Removed getBlockOld()

* Added hasMoreState to the AQL API (and renamed hasMore methods to hasMoreState)

* RemoteBlock now uses the async hasMoreState route

* remove job queue

* options

* Bugfixes in the async implementation of LimitBlock

* LimitBlock::getOrSkipSome now always skips when calculating the fullcount

* fix compile warnings

* restrict threads

* Fixed api of Waiting ExecBlockMock. Unused yet

* Made SortedGatherBlock async-capable

* Removed nonEmptyIndex hack

* Removed duplicate traceGetSome~ calls, moved all to getSome

* Added asserts before replacing getNr*Registers

* Added a TODO note and a comment

* Removed getSomeWithoutRegisterClearoutOld()

* Removed skip()

* Removed common code by using getNr*Registers()

* Use getNr*Registers() in the TraversalBlock as well

* started to add lane

* started to add lane

* added lane

* completed lane

* removed debug output

* fixed merge

* Began working on a test suite for AQL tracing/profiling

* Added more tests and asserts in aql-profiler

* Made some ExecutionBlocks final

* Added a type enum to all blocks and the per-block stats

* Add block type to stats nodes when tracing AQL on block level

* Removed initializeCursor call from instantiateFromPlan

* Avoided additional getSome calls after DONE

* Added more profiler tests

* Refactored ExecutionBlock::getOrSkipSome and fixed two bugs

- set _upstreamState also when skipping
- explicitly use xecutionBlock::getHasMoreState()

* Bugfix: update state

* Reuse parent _skipped wherever possible; rename where not (LimitBlock)

* Simplified SortedCollectBlock::getOrSkipSome and reused general pattern & code

* Implemented missing virtual function (with USE_FAILURE)

* Reset neccessary values during initializeCursor

* Simplified code in EnumerateListBlock a little

* Added a test for DistinctCollectBlock in aql-profiler

* Avoid redundant getSome calls in DistinctCollectBlock

* fix compilation

* Fixed DistinctCollectBlock profiler test

* Added a second profiler test for the DistinctCollectBlock

* Added a profiler test for EnumerateCollectionBlock

* Bugfix in EnumerateListBlock

* added --server.fifoN-size

* Simplified EnumerateCollectionBlock::getSome

* Simplified EnumerateCollectionBlock::getSome, and return HASMORE less often when DONE

* Fix testEnumerateCollectionBlock1 for mmfiles

* do not pass by reference

* Fixed compile error

* fixed merge conflicts

* Added profiler tests for EnumerateCollectionBlock

* Test fix for mmfiles

* Fixed IResearch tests

* Bugfix in DistinctCollectBlock and a regression test

* Updated comment

* Bugfix for query statistics in cluster

* Check plan in distinct test

* Fix aql-profiler tests in cluster

* Removed unused line / bugfix for single server test runs

* This commit implements waking up of AQL queries. (#5651)

* Non-compiling intermediate commit for handover.

* Make branch compile again

* Started implementation of continueable rest cursor handler by moving the callbacks to the outer part. This is not yet fully tested!

* Made finalizeExecute noexcept. We cannot react to this errors as the response was potentially written before. Also introduced continueExecution in the RestHandler engine.

* First successful query wakeup.

* The wakeup callback now posts on the scheduler directly. A resthandler only needs to provide a callback that encapsulates the continueExecution call on this handler

* renamed finalizeExecute to shutdownExecute

* Added a differentiation between Handler and Callback in Query continuation. Handler will be posted in IO service. Callback will be executed directly

* fix audit log

* Removed callback from deleteQueryCursor. This cannot be waiting

* use CONDITION_LOCKER

* removed yet another thread-local variable

* Fixed forward declaration

* Made RestAqlHandler repeatable

* Use defer to close the query in RestAqlHandler. Now waiting will close the query as well.

* Added a mutex in the RestHandlers to make sure if the callback over network is too fast that there is only one Thread running in the RestHandler

* Captured the GeneralCommTask if it is posted to a RestHandler. This is necessary in the PAUSED case

* Refactoring of _noLockHeader responsibilities. Now the BaseHandler selects them and resets them after it is done. Only Coordinators are allowed to define them if a query is loaded.

* Removed reaction to existing nolockheaders in Coordinator Query Planning Phase

* Removed incorrect assertion.

* Further refactoring of NoLockHeaders. Now there is a wrapper class around it which allows for debugging and logging. The state now seems to be better. Also all non-rest-handler triggered queries clean up the NoLockHeaders properly.

* Fixed UserManager, now deletes nolock headers properly

* Swing to the Symphony of Destruction

* Forgot about community build...

* Fixed compiling of Catch tests

* Fixed community build

* need thread for size

* Made the restSimpleHndler repeatable

* Implemented dump and dumpSync in Cursors, Sync will block a thread, dump allows to wait, only relevant for Streaming cursor

* Reactivated StreamingCursors

* Removed debug output.

* Fixed false query continuation

* Reset thread output to non-debug

* Added missing return statements

* Allow some CollectionMethods to hand-in a context that may contain a transaction. This is meant to honor nolock headers.

* Fixed hidden merge conflict

* Bugfix in aql-profiler.js: use plan.nodes order, not stats

* Added two profiler tests for filter

* Avoid too many getBlock calls in the FilterBlock

* Removed debug output

* RemoteBlock API will now send a done(bool) flag whenever we request documents from remote Servers. It is possible that we are DONE and have a result. The pre 3.4.0 API uses exhausted which is exclusive to a result. This API is still implemented for beckwards compatibility.

* Implemented an executeSync function in AqlQuery. This will block the thread until query execution is complete

* Added another test for FILTER, and one test for the HashedCollectBlock

* Added more tests for HashedCollectBlock; avoid unneccessary getSome calls

* Added an profiler IndexBlock test

* IndexBlock: avoid redundant getSome calls, added missing traceGetSomeEnd calls

* Added a second test profiling IndexBlock

* Added a third test for IndexBlock

* Moved general code to module

* Moved noncluster tests into a separate file

* Split aql-profiler testsuite into three files

* Added profiler tests for LimitBlock

* Added a test for NoResultsBlock

* Added profiler tests for TraversalBlock

* Shutdown of an AQL query is now asynchronous. However in Error-Cases it will be executed in a blocking way still

* Optimized TraversalBlock getSome calls due to new (nightly) test results

* Fixed std::min calls I broke

* Let shutdown calls in AQL wait, if the query is executed successfully.

* Fixed queryResult going out of scope

* fix compile error through merge conflict with devel

* Fixed compiler warning "mismatching tags"

* Removed debug log output

* Added TODO notes

* Fixed test fail due to devel merge

* Fixed some invalid sync waiting implementations

* Added a profiler test for SortBlock

* Added profiler tests for SortedCollectBlock

* Fixed bug introduced by devel merge

* Fixed Remoteblocks ignoring errors!

* Added some more continue Callbacks in used places. And removed debug log

* Removed debug log output

* Suppress clang warnings

* Bugfix: use of invalid stack pointer

* Bugfix: RemoteBlock::shutdown now sends code as int, not string

* Revert "Suppress clang warnings"

This reverts commit 05591649c59743c992edd5e78814edc8ca2a83e0.

* Bugfix: cleanup state in RemoteBlock ::shutdown, ::getSome and ::skipSome

* Bugfix in Subquery shutdown: don't skip subquery shutdown when main query shutdown failed

* Allow copy elision
2018-07-09 14:24:10 +02:00
Simon f47367a495 Allow dumping / restoring of views (#5774)
* allow dumping and restoring of views

* fix restore, adding some tests

* remove debug print

* fix global replication
2018-07-05 17:55:28 +02:00
Simon f699d32664 Fix deleting rocksdb views and dump_authentication (#5779)
* fix deleting rocksdb views and dump_authentication

* fix changelog, fix test
2018-07-05 09:40:43 +02:00
Jan 222f77249f
for some reasons fortify complained about these parts (#5777) 2018-07-05 09:38:03 +02:00
Simon b8e140493a Remove redundant geo code, remove WITHIN_RECTANGLE (#5757) 2018-07-04 20:21:00 +02:00
Wilfried Goesgens bcdcb43c4c Feature/upgrade rocksdb (#5484) 2018-07-04 12:04:41 +02:00
Dan Larkin-York 820bfee329 Refactor syncer state and make notes for future parallelization (#5742) 2018-07-03 21:32:16 +02:00
Jan b88fde9659
added key generators "uuid" and "padded" (#5740) 2018-07-03 15:23:47 +02:00
Jan 297279f4f3
turn off MMFiles collection and compaction (#5734) 2018-07-03 15:23:27 +02:00
Simon 439b12331f Big endian document keys for rocksdb (#5712) 2018-07-03 14:11:22 +02:00
Simon 545561e9a9 Read only server (#5652) 2018-07-03 09:58:16 +02:00
Simon ec0d2a1b7b Remove Coordinator DBs (#5661) 2018-06-25 19:18:11 +02:00
Simon 8c48fdf4ab Replace rocksdb export cursor with query (#5657) 2018-06-25 18:14:27 +02:00
Andrey Abramov 5eef6cd618
Feature/test iresearch (#5610)
* start implementing arangosearch cluster tests.

* backport: ensure view lookup is done via collectionNameResover, ensure updateProperties returns current view properties

* first attempt to fix failing tests

* refactor cluster wide view creation logic

* if view is not found in the new plan then check the old plan too

* ensure the cluster-wide view is looked up in vocbase as well on startup/recovery

* do not store cluster-wide IResearchView in vocbase

* move stale view cleanup to the shared pointer deleter, address test failures

* do not print warning

* enable arangosearch tests by default

* fix catch tests

* address icorrect return value for cluster-wide links

* address some issues with test failures due to cluster-view allocated within TRI_vocbase_t

* simplify per-cid view name, address 'catch' test failures

* ensure IResearchViewNode volatility is properly calculated in cluster

* invoke callbacks directly in AgencyMock instead of waiting for timeout

* ensure view updates via JavaScript always use the latest view definition

* pass a list of shards to `IResearchViewDBServer::snapshot`

* extend cluster aql tests

* fixes after merge

* fix class/struct inconsistencies

* comment failing tests

* remove debug logging

* add debug function

* tests cleanup

* simplify upcoming merge: pass resolver from a side

* backport: move all transaction status callback logic to Methods

* add changes missed from previous commit

* fix js and ruby tests

* more tests for IResearchViewNode

* pass transaction to IResearchViewDBServer::snapshot, address IResearchViewDBServer tests segfault

* pass transaction to IResearchView::snapshot instead of transaction state

* temporarily add trace log output to tests to try to find the cause of the core dump on Jenkins

* add more temporary debug output to trace down the segfault on Jenkins

* add even more temporary debug output to trace down the segfault on Jenkins

* ensure Vieew related maps are cleared during shutdown

* reset ClusterInfo::instance() before DatabaseFeature::unprepare()

* remove extraneous debug output

* missed line from previous commit

* uncomment required line

* add nullptr checks to RocksDBIndexFactory::prepareIndexes(...) similar to the ones in MMFilesIndexFactory::prepareIndexes(...)

* attempt to fix deadlock in tests

* add comment as per reviewer request

* fix aql test suite name

* add some debug logging

* address deadlock between ClusterInfo::loadPlan() and CollectionNameResolver::localNameLookup(...)

* eplicitly state which index definition failed in the log message

* use vocbase from shard-view isntead just in case

* explicitly state which index definition failed in the log message

* do not create shard-view instances from cluster-link instances (only register existing ones)

* add some tests
2018-06-21 20:35:04 +03:00
Simon 3bec336aff TransactionState::addCollection refactoring (#5606) 2018-06-14 15:34:58 +02:00
Vasiliy a5f274234a issue 380.2.2: remove extraneous pointers from StorageEngine API (#5589) 2018-06-13 15:22:51 +03:00
Jan Christoph Uhde f81e42af36 Add optimizer rule that replaces js function calls (NEAR/WITHIN/FULLTEXT) with pure AQL (#5529) 2018-06-12 13:48:31 +02:00
Heiko 743d4430bf added replication ui (#5555) 2018-06-08 11:19:05 +02:00
Vasiliy 3e983adb2d issue 381.6: enforce use of VIEW keyword for bound views and disallow for bound collections (#5522) 2018-06-05 14:45:53 +03:00
Vasiliy e021085aac issue 381.3.1: remove redundant copy of CollectionNameResolver from TransactionState (#5459) 2018-05-25 16:48:43 +03:00
Simon 332a7958f5 Cleanup cluster selectivity (#5440) 2018-05-23 18:00:14 +02:00
Jan 8e6d5df129
fixed minor several compiler complaints (#5406) 2018-05-23 11:50:00 +02:00
Jan 30d0d840c2
Bug fix/validate from to consistently (#5434) 2018-05-23 11:41:30 +02:00
Jan cb34760f40
fix issue #5400: Unexpected AQL Result (#5410) 2018-05-23 11:39:05 +02:00
Jan 1eea2df7d0
fixed issue #5252 (#5427) 2018-05-23 08:30:27 +02:00
Vasiliy 94ddd7803d issue 389.10: refactor CollectionNameResolver to use TRI_vocbase_t& (#5424) 2018-05-23 00:59:08 +03:00
Simon 35992ad67b Coordinator storage engine (#5405) 2018-05-22 19:30:27 +02:00
Jan 72ec463a8d
Bug fix/cleanup 2005 (#5404) 2018-05-20 20:57:43 +02:00
Vasiliy 843e584746 issue 389.5: refactor StandaloneContext to be constructed with a TRI_vocbase_t& (#5370)
* issue 389.5: refactor StandaloneContext to be constructed with a TRI_vocbase_t&

* backport: address build issues
2018-05-17 01:15:50 +03:00
Jan 0d98c0f3ba
Bug fix/fix codescan issues (#5371) 2018-05-16 20:40:37 +02:00
jsteemann 25f0853095 simplify Result construction 2018-05-16 14:15:48 +02:00
Jan 7147ff9006
apply fixes found by cppcheck (#5360) 2018-05-15 20:06:36 +02:00
Jan Christoph Uhde 18a3663746 speed up replication (#5226) 2018-05-14 18:32:26 +02:00
Vasiliy 6a53154160 issue 389.2: use static strings for Index definition json attributes, use TRI_vocbase_t references instead of pointers in V8Context, use TRI_vocbase_t references instead of pointers in DatabaseInitialSyncer (#5344) 2018-05-14 19:06:24 +03:00
Simon Grätzer 15000c5989 revert change 2018-05-12 02:07:00 +02:00
Simon Grätzer 5e4d133324 Slightly increase batch size 2018-05-12 01:27:58 +02:00
Simon Grätzer 40b45bf4d1 Make huge deletes go in smaller batches 2018-05-12 01:25:01 +02:00
jsteemann 39da191b11 report missing cache hit information as 0 values, not as non-representable types 2018-05-11 14:49:42 +02:00
Simon 08e355aed8 Simple dump speedup (#5298) 2018-05-09 12:51:04 +02:00
jsteemann 7f8a1cc614 Merge branch 'bug-fix/add-missing-overrides-and-final' of https://github.com/arangodb/arangodb into devel 2018-05-07 23:02:46 +02:00
Vasiliy 2ce20e86d7 issue 373.1: move globally-unique id generation from collection into data-source (#5182) 2018-05-07 22:14:40 +03:00
Andrey Abramov b69b5bdfdf
Bug fix/issue #5186 (#5269)
* do not persist view on startup

* small refactoring

* ensure view is being opened after creation
2018-05-06 20:38:32 +03:00
jsteemann 52de92d334 add missing override specifiers, add final specifiers 2018-05-04 09:01:50 +02:00
Jan 9c0460acff
Feature/aql optimizations (#5237) 2018-05-03 16:55:58 +02:00
Simon 828f1d423c S2 based Geo-Spatial index (#5249) 2018-05-02 23:54:41 +02:00
Jan 5357adad95
Feature/count plan nodes by type (#5225) 2018-04-30 12:52:32 +02:00
Jan 349e2c1681 forward-port AQL optimizations from 3.3 (#5020)
* forward-port AQL optimizations from 3.3

* fix restrict-to-single-shard rule

* added tests for specific cases

* ModificationNodes now can know if they are restricted or not

* OptimizerRule now updates the ModificationNode instead of setting ownName on remote node.

* The DBServerEngine container now only sends a subset of snippets (those which are relevant) It is  able to restrict any part of the query to a certain shard or even a list of shards

* ExecutionEngine CreateBlocks in ClusterMode now returns Result instead of throwing.

* Adapted Coordinator side to a bitter mapping of RemoteNode => QuerySnippets. This is still ongoing work.

* Fixed Coordinator enginecontainer test and finisehd implementation of EngineInfoContainerDBServer. Seems to work so far, need to adapt test to prove it.

* Adapted test for modification nodes and restrict to shard.

* restrictTo can now be de-/serialized on Modification Nodes

* Fixed Community Compile Error

* Added a test for Indexes/EnumerateCollection nodes

* EnumerateCollection and IndexNode now have options to be restricted to a single shard, opt rule not yet updated

* DBServer part of planning now checks Enumerate and IndexNodes for single shard optimization

* Added tests for simple single shard optimization on IndexNodes

* Adapted optimzierrule for SingleShard optimierung on IndexNodes

* Fixed an issue with externally restricted shard ids in combination with shard_id based optimization

* Added a test for multiple single shard optimizations on the same collection

* Removed collection/Shard duplicate check of optimize to single shard rules

* Updated Explainer to handle optimize to single shard

* Let more tests pass an optimized AQL variant

* Temporarily disabled a tests that can only be solved after some work in transaction
2018-04-30 11:25:09 +02:00
Jan 30b12e311b
Bug fix/remove most of aql js (#5223) 2018-04-30 11:17:11 +02:00
Simon 468231efc5 AQL Profiling code (#5165)
* initial start of profiling

* adding profiling code

* Fixing remote block tracing, fixing width and units

* Fixing some tests

* Various fixes

* adressing review comments
2018-04-24 16:17:30 +02:00
Wilfried Goesgens 7d6e580780 Refactoring & code cleanup (#5138) (#5142) 2018-04-24 14:42:23 +02:00
Jan 2b84348b77
remove call to requiresElevatedPrivileges with default value (#5172) 2018-04-23 11:28:24 +02:00
Vasiliy 9062c41592 issue 383.3: implement remainder of IResearchViewDBServer tests, use the data-source id (primary key) instead of an arbitrary instance for dropCollection()/dropView(), backport from iresearch upstream: ensure block is flushed if key index is full (#5176) 2018-04-23 00:33:46 +03:00
Jan 0972befd87 fix lookups by _id (#5125) 2018-04-18 09:26:29 +02:00
Simon 7677afabf1 Remove copy of request body in rest handlers (#5104) 2018-04-16 14:49:51 +02:00
Vasiliy 0abd46ad73 backport: use vocbase reference instead of pointer in arangodb::pregel::GraphStore 2018-04-13 11:23:34 +03:00
Vasiliy f392925903 issue 374.3: use a reference to vocbase instead of a pointer in DatabaseGuard 2018-04-13 09:56:49 +03:00
Vasiliy d470371f7c issue 374.2: use a reference to vocbase instead of a pointer in StorageEngime LogicalDatasource related DDL operations, use vocbase from the found collection 2018-04-11 18:49:46 +03:00
Vasiliy aece5f4e4d backport: address issue with inverted check for isCoordinator 2018-04-11 09:25:11 +03:00
Vasiliy d1ce3a97ef issue 355.7: ensure LogicalDataSource::vocbase() returns a reference 2018-04-09 15:38:24 +03:00
Vasiliy e4368b0991 issue 355.6: remove create() from LogicalView, remove IResearch dependency from IndexFactory, store vocbase reference in LogicalDataSource 2018-04-06 16:38:34 +03:00
Vasiliy 99b83ba8c8 issue 355.5: remove more unused methods, move view-related storage engine functionality from vocbase into DBServerLogicalView, address MSVC cmake dependency issue 2018-04-05 16:17:07 +03:00
Vasiliy 635db3b409 issue 355.4: remove redundant methods and code, use 'cp' instead of 'cmake copy_directory' where possible, use vocbase reference instead of pointer 2018-04-04 10:53:48 +03:00
Simon f6d3032f59 Enabling cache (#4880) 2018-04-03 14:18:57 +02:00
Andrey Abramov 2cca7a926b remove code duplication 2018-03-30 16:01:00 +03:00
Andrey Abramov eaa91592e5
Merge branch 'devel' of https://github.com/arangodb/arangodb into feature/remove-view-implementation 2018-03-27 14:58:55 +03:00
Andrey Abramov b641cf9b13
remove view implementation part 1 2018-03-26 23:18:08 +03:00
Dan Larkin-York 898f3e1dd0 Fix compiler warnings/issues from arangodump parallelization for Mac. (#4965) 2018-03-26 17:36:21 +02:00
Dan Larkin-York 38f162e344 Parallelize arangodump (#4356) 2018-03-26 15:55:14 +02:00
Andrey Abramov 6b9bffa343 remove PhysicalView part 3 2018-03-23 15:17:05 +03:00
Andrey Abramov 47fd5808c3 remove PhysicalView part 2 2018-03-22 22:41:28 +03:00
Andrey Abramov a874fda823 remove PhysicalView part 1 2018-03-22 20:42:42 +03:00
Andrey Abramov 01d9baf359 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
Vasiliy 06eb8ade01 issue 344.7: remove more redundant functions (#4863)
* issue 344.7: remove more redundant functions

* backport: fix missed functions under USE_ENTERPRISE
2018-03-15 17:10:28 +01:00
Jan f1a2acebfb remove useless flush from test, bump wal flush default timeouts (#4845) 2018-03-14 21:59:48 +01:00
Vasiliy c8739cd3cd manually-merge: cache data-sources in CollectionNameResolver 2018-03-14 10:11:50 +03:00
Vasiliy bf0068e7f5 Changes since last PR: use a single map in vocbase for storing LogicalDataSource instances 2018-03-08 17:28:08 +03:00
Simon 272859c5fd Replacing js upgrade logic (#4061) 2018-03-08 13:57:30 +01:00
Vasiliy daa1db659c manually-merge: differentiate data-source types by category e.g. LogicalCollection/LogicalView 2018-03-08 13:40:25 +03:00
Simon 102998dd65 Streaming Query Cursor (#4769) 2018-03-08 09:18:41 +01:00
Simon f1d01a4585 Replace sleep (#4767)
For windows.
2018-03-06 17:33:15 +01:00
Vasiliy f9a45032cd LogicalDataSource for Methods::StateRegistrationCallback instead of TRI_voc_cid_t to avoid unnecessary lookups (#4732)
* Changes since last PR: use LogicalDataSource for Methods::StateRegistrationCallback instead of TRI_voc_cid_t to avoid unnecessary lookups
* backport: address cluster LogicalDataSource resolution failure
2018-03-06 11:41:41 +01:00
Simon 1b572c52c2 Active-Failover VelocyStream Fixes (#4715) 2018-03-05 15:54:19 +01:00
Simon 950e8c3e7b Fixing issues related to missing auth rights (#4753) (#4754)
(cherry picked from commit 38a99d8f65)
2018-03-05 13:48:51 +01:00
Wilfried Goesgens f489b7d5de fix dumping permission checks; (#4725) 2018-03-01 17:17:11 +01:00
Simon 345fc3c0b7 Refactor Authentication Layer (devel) (#4592)
* Cherry Picking LDAP changes

* Adding missing merges

* Fixing remaining mentions of FeatureCacheFeature

* Fix jslint

* Fixing some failed tests

* Fixing cluster authentication issue, red tests

* Fixing ldap testsuite, adding trace logging

* Fixint ldap tesuite setup and LDAP recognition

(cherry picked from commit 686d28a779)

* Fixing wrong assert

* Adding changelog entry, making requested changes from code review

* Fixing dump_authentication, fix typos

* improvements found during code review

* oops

* more use of sessionstorage

* fix tests

* Fixing broken handling, disallowing adding of local users when disabled

* Fixing testInvalidGrants

* Removing undefined auth level externally

* Fixing previous commit

* added tests for ldap search mode

* intentionally removed `after` methods from tests

because they are executed before the tests start
no cleanup is performed right now after the authentication tests
however, a cleanup is done at start of every test

* ldap tests all modes

* forward port changes from 3.3

* added generated files

* forward port missing changes for web UI

* added generated files

* added generated files
2018-02-28 13:24:28 +01:00
Jan 9d42be07e8
Bug fix/eom fixes (#4693) 2018-02-28 08:40:30 +01:00
Jan 3cf03cfb21
Feature/cleanup internal (#4680) 2018-02-27 14:53:31 +01:00
Jan d841b56c77
Bug fix/several optimizations (#4672) 2018-02-26 15:19:01 +01:00
Simon c609a4f08e remove invalid assertions (#4669) 2018-02-26 08:04:54 +01:00
Simon cde96d97aa RocksDB replication hardening & cleanup (#4639) 2018-02-23 18:15:04 +01:00
jsteemann fcfff0806b remove invalid assertion 2018-02-22 09:50:58 +01:00
Jan 0b99acc04d
properly convert the JS object to VPack for transactions (#4640)
previously this did not work when the "action" attribute was a JavaScript function
2018-02-21 12:10:19 +01:00
Jan b3556f7b17
some fixes for replication (#4621) 2018-02-19 15:54:55 +01:00
Jan 63c50c3993
Bug fix/handle single delete (#4618) 2018-02-19 14:49:58 +01:00
Dan Larkin 96dbc693db Speed up condition normalization (DNF conversion) (#4574) 2018-02-13 22:13:52 +01:00
Andrey Abramov 1b7dd672c9 Bug fix/internal issue #342: allow to bind a view name (#4554) 2018-02-13 21:53:01 +01:00
Jan 935e2790ad
forward port of replication bugfixes from 3.2 (#4572) 2018-02-12 18:13:51 +01:00
Dan Larkin 20767cfc5d Fix selectivity computation. (#4558) 2018-02-12 16:16:12 +01:00
Dan Larkin 5109417d72 Added some currently unnecessary locking as preventative measure agai… (#4559)
* Added some currently unnecessary locking as preventative measure against potential future changes.

* return by move will disable RVO, fix compiler warning
2018-02-11 18:54:23 +01:00
jsteemann 0c4f22659b fix compile error 2018-02-09 17:37:38 +01:00
Dan Larkin 934e936bae Fix index selectivity estimate issues with RocksDB engine (#4429) 2018-02-09 16:05:33 +01:00
Simon 35136a89c0 Fix some problems with active failover (#4540) 2018-02-09 15:11:53 +01:00
Jan 8da61a9875
Bug fix/more replication tests (#4500) 2018-02-09 13:06:47 +01:00
Andrey Abramov 630d1afacf properly handle `IndexCreate` markers in rocksdb recovery 2018-02-02 16:23:25 +03:00
Jan fe0fca9029
Bug fix/restore unlock (#4387) 2018-01-25 15:56:27 +01:00
Andrey Abramov a1cfb3d72b Feature iresearch (#4105) 2018-01-19 14:23:58 +01:00
Jan b32cf3822a
explicitly control activation of RocksDB write-throttling feature (#4360)
also consistently use -DNDEBUG to avoid different class layouts when
the same class are used by different translation units
2018-01-19 09:33:01 +01:00
Jan 1e116a9f6d
slight cleanup of replication-related code (#4286) 2018-01-17 16:56:40 +01:00
Jan Christoph Uhde b9a489eb9e Feature/faster any (#4306) 2018-01-17 16:55:47 +01:00
Michael Hackstein 40fa74f626
Bug fix/selectivity estimates on abort (#4337) 2018-01-16 18:21:55 +01:00
Michael Hackstein 802fda8e10 Revert "Bug fix/selectivity estimates on abort (#4314)"
This reverts commit d32f3b5fe9.
2018-01-16 14:39:02 +01:00
Michael Hackstein d32f3b5fe9
Bug fix/selectivity estimates on abort (#4314) 2018-01-16 12:39:03 +01:00
Simon ab0578320a Adding view rename case to replication server handlers (#4299) 2018-01-16 09:19:57 +01:00
Michael Hackstein d32ac3b9c8
Bug fix/rocksdb truncate (#4060) 2018-01-16 09:01:04 +01:00
Jan c69868bde7
fix small issues found by codescan (#4241) 2018-01-16 00:27:42 +01:00
Jan 653f95f243
fixed issue #4185: On execution of FULLTEXT search / AQL query db is … (#4238) 2018-01-16 00:27:27 +01:00
Jan 37da067059
fix missing events in RocksDB-based replication for transactions that… (#4277) 2018-01-16 00:27:11 +01:00
Jan Christoph Uhde 9c2ebb7bfc remove code that potentially throws from ~WBReader (#4282) 2018-01-15 15:14:55 +01:00
Jan af87e115c1
next attempt (#4254) 2018-01-10 00:07:51 +01:00
Jan 7f860153ba
Bug fix/msvc fixes (#4243) 2018-01-08 11:20:53 +01:00
jsteemann 6f30b47853 several compile warnings fixed 2018-01-05 18:20:41 +01:00
Jan b2b6c06cbf
Feature/efficiency (#3736) 2018-01-05 16:51:31 +01:00
Jan e6572e6804
ensure proper shutdown of throttle (#4234) 2018-01-05 15:09:22 +01:00
Jan 1e4547c5e0
prefer unique equality lookups, as they do not have O(log(n)) complexity (#4097) 2018-01-05 14:49:53 +01:00
Jan 7d05dac4fd
fix nullptr access (#4142)
* fix nullptr access

* fixed compile error
2017-12-22 10:58:46 +01:00
Jan 52d0a4593e
Bug fix/add recovery tests for intermediate commits (#4108)
* added several recovery tests that check intermediate commits

* small fixes

* fix tests
2017-12-20 09:46:06 +01:00
Simon Grätzer 415205693a Make sure recalculated counts are actually stored (#4080) 2017-12-19 21:42:33 +01:00
Jan 315a827da8
fix wrong lock usage (did not have any effect except misleading the reader of the code) (#4085) 2017-12-19 09:21:06 +01:00
Jan 2a96df5ca5
Feature iresearch (#4071) 2017-12-18 15:04:59 +01:00
Jan 82abb24388
add missing replication context fix (#4066) 2017-12-18 09:16:19 +01:00
Matthew Von-Maszewski e6f7282e03 Make chooseTimeout() dynamic (#3996)
* add parameter to increase timeouts per 4096 size of total request package

* remove log output

* change initial timeout math from integer to double ... avoids reviewer confusion.
2017-12-15 18:25:18 +01:00
Simon Grätzer 19f68df395 Use uuid in Initial sync to ensure proper collection mapping (#3965)
* Use uuid in initalsync to ensure proper collection mapping

* fix compile error after merge
2017-12-13 22:12:47 +01:00
Jan 9c76613e63
fix premature unlock (#3802)
* fix some deadlocks found by evil lock manager (tm)

* fix duplicate lock

* fix indentation

* ensure proper lock dependencies

* fix lock acquisition

* removed useless comment

* do not lock twice

* create either a V8 transaction context or a standalone transaction context, depending on if we are called from within V8 or not

* AQL micro optimizations

* use explicit constructor

* only use V8DealerFeature's ConditionLocker for acquiring a free V8 context

entering and exiting the selected context is then done later on without having to hold the ConditionLocker

* remove some recursive locks

* Disable custom deadlock detection when Thread Sanitizer is enabled

* Changing ifdef's

* grr

* broke gcc

* Using atomic for ApplicationServer::_server

* fix premature unlock

* add some asserts

* honor collection locking in cluster

* yet one more lock fix

* removed assertion

* some more bugfixes

* Fixing assert

(cherry picked from commit 1155df173bfb67303077fbe04ee8d909517bfd21)
2017-12-13 13:27:42 +01:00
Jan 3143805c6f
make replication abortable (#4016) 2017-12-13 12:32:04 +01:00
Simon Grätzer 739af2d1f5 Fixing some accidentally broken fulltext tests (#3951)
* Fixing some accidentally broken tests

* Fixing test...again
2017-12-13 10:19:17 +01:00
Jan 98d6eff37e
added assertions to make sure the generated ticks are as expected (#3969) 2017-12-13 10:19:00 +01:00
Simon Grätzer dce677720d Fixing an issue with intermediate commits (#3975) 2017-12-12 09:17:18 +01:00
Matthew Von-Maszewski a7b4599ff9 add defensive coding and logging in response to a divide by zero. ColumnFamilyData::RecalculateWriteStallConditions() called SetBytePerSecond() with some value less than four. Could have been a race condition due to our SetThrottle() called without db mutex. No proof, just likely. (#3949) 2017-12-08 15:42:44 +01:00
Jan eb0190066b
allow passing a serverId value of "none" to replication APIs (#3909) 2017-12-08 11:35:53 +01:00
Jan 282be208cc
remove TRI_usleep and TRI_sleep, and use std::this_thread::sleep_for … (#3817) 2017-12-06 18:43:49 +01:00
Jan 9f8c5488c2
fix Windows ifdefs (#3824) 2017-12-06 18:43:12 +01:00
Jan 73b3c65153
fix revision id vs local document id usage in incremental sync (#3887) 2017-12-06 16:33:57 +01:00
jsteemann 53c2349d7c fix compile warning 2017-12-06 14:41:15 +01:00
Simon Grätzer ec80ee39fd Fulltext Index Cursor (#3807) 2017-12-06 14:29:57 +01:00
jsteemann 9a5cd393e0 added missing guard 2017-12-06 12:15:47 +01:00
Jan 3b5b1e4eba
fix replication context locking (#3875) 2017-12-06 12:11:55 +01:00
Jan 4eab985e90 fix wrong ifdefs (#3803) 2017-11-27 14:20:04 +01:00
Matthew Von-Maszewski 50012d1ed8 Throttle adjustments for high speed arrays (#3755) 2017-11-22 12:03:55 +01:00
Simon Grätzer 0e485f7441 Fixing collection name collection handling in Syncer (#3710) 2017-11-17 16:36:57 +01:00
Jan b4f6ee9273 Feature/improved index api for unique constraints and replication (#3715) 2017-11-16 21:02:01 +01:00
Jan 4a199e2fe3 make truncate a bit less obstrusive (#3721) 2017-11-16 20:28:33 +01:00
Matthew Von-Maszewski 97944f012e Fix issues due to throttle started with too small a flush (#3707) 2017-11-16 09:13:08 +01:00
Jan 3b0a8a9cdf make the replication applier auto-start for the RocksDB engine if con… (#3647) 2017-11-15 12:02:37 +01:00
Max Neunhoeffer bc1891dfd0
Comment out RocksDBThrottle. 2017-11-14 16:53:42 +01:00
Jan cc1fc716a4 Bug fix/fix server mode test side effects (#3674) 2017-11-14 15:19:00 +01:00
Simon Grätzer c6fe726901 Removing unsafe asserts in wal tailing v3.3 (#3672) 2017-11-13 17:41:57 +01:00
Matthew Von-Maszewski bbce4caefa Feature/mv basho smoothing1 (#3384) 2017-11-13 15:43:44 +01:00
Jan 03daf9e9c9 make incremental sync replication API check if the client passed an "offset" request parameter (#3669)
if yes, the server may dynamically adapt the size of the response, in order to ensure that
HTTP responses do not get out of hand size-wise. This is a new feature in devel, and this
commit now makes it optional so that older clients do not need to be changed.
2017-11-13 15:08:31 +01:00
Jan Christoph Uhde daf98e145e improve rocksdb logging (#3613) 2017-11-11 19:35:27 +01:00
jsteemann 571d4587ca Revert "Return offending key for unique constraint violations (#3624)"
This reverts commit 68bd31ac99.
2017-11-10 16:40:56 +01:00
Dan Larkin 68bd31ac99 Return offending key for unique constraint violations (#3624) 2017-11-10 16:03:10 +01:00
Jan 733f27e997 Bug fix/fix compilation with gxx7 (#3637) 2017-11-10 16:00:57 +01:00
Jan bef52d7dc3
Bug fix/cleanup after cppcheck (#3639) 2017-11-10 13:53:28 +01:00
Simon Grätzer 87f441753b RocksDB WAL tailing fixes (#3595) 2017-11-10 09:31:53 +01:00
Jan 7613bc4314 Bug fix/fixes 0211 (#3568)
* remove some non-unused V8 persistents

* do not throw that many bogus assertions

* do not rely on server role being defined

* slightly better debug output for V8 context debugging

* fix collection ids in inventory response

* simplify bootstrap a bit

* slightly better error handling

* make elapsed time a queryable value

* use less memory for stub collections

* added assertions that will always make sense

* added assertions

* do not garbage-collect while waiting

* less copying of parameters

* do not show "load indexes into memory" buttons for mmfiles engine

  as all indexes are in memory anyway

* when a collection is truncated via the web interface, flush the WAL and rotate all active journals

this will make close all open journals on leader and followers and make them subject to compaction opportunities

* fix invalid server id values being passed from web interface to backend

* introduce afterTruncate method for indexes

* added test case for issue #3447

* updated CHANGELOG

* don't warn about replicationFactor for system collections

* check that the queries actually use the geo index and not some other index

* properly report error in web interface

* fix some internals checks that made truncate fail for bigger collections in maintainer mode

* also run a compact() operation after a serious truncate

in order to make iteration over the truncated range much faster
when the collection is next accessed

* increase default maximum number of V8 contexts to at least 16
2017-11-09 12:48:15 +01:00
Jan 0195ede1d8 potential fix for issue #3581: Unexpected "rocksdb unique constraint violated" with unique hash index (#3596) 2017-11-07 10:42:41 +01:00
Jan f6a90c4879 some cleanup (#3583) 2017-11-07 10:27:21 +01:00
Simon Grätzer ee8209943f Missing things for active / passive (#3578)
* Switching from ttl to supervision based failover mechanism

* Allowing canceling of ongoing actions

* refactored asyncjobmanager

* refactoring some code

* adding read-only flag

* catching some exceptions to reduce log pollution, removing unnecessary code, removing tests for _changeMode

* fixing "createsANewDatabaseWithAnInvalidUser"

* auth = off does not longer make everyone superuser

* Fixing cluster_sync and maybe resilience
2017-11-04 20:30:23 +01:00
Simon Grätzer 64e9377c05 Replacing /_api/collection with RestHandler (#3543) 2017-11-02 14:57:17 +01:00
Jan 4d03d3bd82
Bug fix/fixes 2410 (#3511)
* slightly clean up indexes

* proper stringification of error code

* improve diagnostic messages

* improve memory usage for incremental sync
2017-10-30 22:49:24 +01:00
Simon Grätzer 05d6a9a9f4 Reuse buffers for HttpResponse (#3433) 2017-10-30 17:30:36 +01:00