1
0
Fork 0
Commit Graph

51 Commits

Author SHA1 Message Date
Andrey Abramov ff93f45892
Bug fix/internal issue #651 (#10415)
* Bug fix 3.5/internal issue #651 (#10388)

* extract recursive part of IResearchLinkMeta

* avoid saving analyzer definition during link meta initialization

* add tests to check cluster deadlock

* cleanup

* code cleanup

* add moar tests

* mooooaaar checks

* make jslint happy

* backport fix for cluster startup from 3.5.2 branch

* backport changes from 3.5.2

* fix tests

* fix tests

* moar fixes

* refactor analyzer definitions tracking

* add some tests

* extend dump tests

* add tests for replication

* fix tests

* more fixes

* address jslint errors

* address review comments

* address test failures

* reflect changes in changelog

# Conflicts:
#	arangod/IResearch/IResearchAnalyzerFeature.cpp
#	arangod/IResearch/IResearchFilterFactory.cpp
#	arangod/IResearch/IResearchLink.cpp
#	arangod/IResearch/IResearchLinkMeta.cpp
#	tests/IResearch/IResearchAnalyzerFeature-test.cpp
#	tests/IResearch/IResearchDocument-test.cpp
#	tests/IResearch/IResearchFilterBoolean-test.cpp
#	tests/IResearch/IResearchFilterCompare-test.cpp
#	tests/IResearch/IResearchFilterFunction-test.cpp
#	tests/IResearch/IResearchFilterIn-test.cpp
#	tests/IResearch/IResearchLinkHelper-test.cpp
#	tests/IResearch/IResearchLinkMeta-test.cpp
#	tests/IResearch/IResearchView-test.cpp
#	tests/V8Server/v8-analyzers-test.cpp

* fix tests

* fix tests

* Fix tests

* fix replication tests
2019-11-13 19:50:17 +03:00
Jan Christoph Uhde 484e2971d6 C++17 clean up (#10287) 2019-11-11 08:49:54 +01:00
Jan c0136b49c7
use static_cast instead of dynamic_cast (#10095)
* use static_cast instead of dynamic_cast

* remove virtual inheritance
2019-09-27 12:58:52 +02:00
Dan Larkin-York a83c2323c9 Refactor ApplicationServer stack (#9965) 2019-09-25 17:31:59 +02:00
Simon dde1a82fce Network Code V2 (#7962) 2019-08-14 17:25:03 +02:00
Tobias Gödderz 9cd332b958 Feature/rebootid notice changes (#9523)
* Consolidated _servers and _serverAdvertisedEndpoints, added rebootId, prepared change notifications

* Cleanup

* Added a RebootId type

* Began implementing RebootTracker (still WIP)

* Moved RebootId operators into the class

* Removed RebootId operator<< again

* Added tests, added CallbackGuard, removed/commented old RebootTracker code

* Fix: do not try to call unset callbacks

* Split one test, added another

* Added more tests

* Renamed tests, added more tests

* Fixed missing variable declarations

* Let MockServer appear to be started

* Reorded test, fixed naming

* Implemented callMeOnChange()

* Re-implemented RebootTracker (not yet working)

* Resolved a TODO, updated a test, added comments

* Call old callbacks immediately

* Fixed tests

* Use EXPECT_* instead of ASSERT_*

* Suppress a log message

* Resolved TODOs

* Reverted changes on reading ServersRegistered

* Update RebootTracker

* Introduce `rebootId` into ServerState for Cluster

 * A server *boots* if it is started on a previously non-existing data
   directory and hence does not have a UUID yet.
 * A server *reboots* if it is started on a pre-existing data directory

We keep the rebootId in the cluster's agency under
Current/ServersKnown/$uuid/rebootId.

When rebooting (and subsequently re-joining a cluster), the server increments
its rebootId in Phase 2 of registration. This way it can be detected within the
cluster whether a server was restarted.

This information will later be used to handle cases where server restarts can
lead to problems, for example with transactions or in-progress queries.

* Move rebootId into Current/ServersKnown/

* Fixed typo

* Fixed log ids

* Add deletion of ServersKnown/UUID from agency

* Add deletion of Current/ServersKnown/UUID to removeServer

* Clean up readRebootIdFromAgency and add retry loop around it

* Bugfix

* Added nolint comments

* Fixed initialization order

* Fixed ClusterInfo-test

* Added log messages

* Revert "Fixed ClusterInfo-test"

This reverts commit d983596979.

* Disabled assertion for google tests

* Ignore windows compile warning

* Always call loadServers in loadCurrent

* Fix really subtle bug when not returning a value

* Introduce `rebootId` into ServerState for Cluster

 * A server *boots* if it is started on a previously non-existing data
   directory and hence does not have a UUID yet.
 * A server *reboots* if it is started on a pre-existing data directory

We keep the rebootId in the cluster's agency under
Current/ServersKnown/$uuid/rebootId.

When rebooting (and subsequently re-joining a cluster), the server increments
its rebootId in Phase 2 of registration. This way it can be detected within the
cluster whether a server was restarted.

This information will later be used to handle cases where server restarts can
lead to problems, for example with transactions or in-progress queries.

* Move rebootId into Current/ServersKnown/

* Add deletion of ServersKnown/UUID from agency

* Add deletion of Current/ServersKnown/UUID to removeServer

* Clean up readRebootIdFromAgency and add retry loop around it

* Fixed compile error due to forbidden implicit cast

* Fixed compile error on windows

* Fixed compile error due to devel merge

* Removed dead comment

* Removed TODO note

* Extended comment

* Removed TODO note

* Fixed using an invalidated iterator

* Copy string only if necessary

* Fixed compile error
2019-08-12 09:33:22 +02:00
Dan Larkin-York 3d0246cb18 Decentralize includes (#9623) 2019-08-06 15:32:09 +02:00
Jan 1d15b50d22
Bug fix/applicationserver stop (#9414) 2019-07-08 20:30:05 +02:00
Jan Christoph Uhde 677a79026c Foxx Security (#8845) 2019-04-25 09:56:29 +02:00
Jan 2c4accdf34
micro improvements for rocksdb options (#8433) 2019-03-19 12:47:57 +01:00
Frank Celler ac9f375fb5 big reformat 2018-12-26 00:54:03 +01:00
jsteemann 67c98cb9c7 remove currently unused method 2018-12-04 20:05:05 +01:00
Simon 912f109968 Add simple Future library (#6464) 2018-09-21 16:14:17 +02:00
Vasiliy e862efdc3b issue 458.4: retrieve the system database via the SystemDatabaseFeature (#6299) 2018-08-31 19:45:10 +02:00
Matthew Von-Maszewski 86ea784372 bugfix: establish unique function name & implementation for communication retry status (#6150)
* initial checkin of isRetryOK().  Includes fixes to known code that has previously hung shutdowns by performing infinite retries.

* slight help on getting out of a loop faster during shutdown.  not essential.
2018-08-17 14:57: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 8e6d5df129
fixed minor several compiler complaints (#5406) 2018-05-23 11:50:00 +02:00
Vasiliy 907767f4e1 issue 389.6: ensure proper error handling in StatisticsFeature for missing feature (#5377) 2018-05-18 01:12:39 +03:00
Jan 646db8ca0a
added `--dump-option` startup option to print all available options i… (#5174) 2018-04-23 11:31:08 +02: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 ce2425cade Bug fix/daily fixes (#2958)
* do not rely on non-existing feature "AQL"

using such feature makes the server throw two exceptions (which will be caught) on startup, but its silly for debugging

* use condition variable for signalling shutdown

* do not hard-code the log levels for recovery tests

this has taken so many developers so much of their time that it is about time to fix it

* ensure the 'unittests' script properly finds 'arangosh' and the build directory
2017-08-04 20:46:08 +02:00
Jan 871ee6a85f added startsBefore() for ApplicationFeature (#2913) 2017-08-01 17:15:25 +02:00
Frank Celler cf89496faa shutdown will close sockets immediately (#2540) 2017-06-09 16:08:54 +02:00
jsteemann 6b18cc64fe dont use explicit when unnecessary 2017-06-01 16:47:56 +02:00
Wilfried Goesgens 613ad8bd9c when running as service correctly set the error state on abort / failure cases, so other components can evaluate it. 2017-05-31 13:21:50 +02:00
jsteemann edeeef8b56 re-enabled signal handlers 2017-05-05 13:09:59 +02:00
jsteemann 922a8af392 turn off all MMFiles features in case RocksDB engine is selected 2017-03-27 14:22:00 +02:00
jsteemann 0ac29eb177 don't fail when using optional features as dependencies 2017-03-01 12:52:51 +01:00
jsteemann 7359ac44b2 more style cleanup 2017-01-05 10:52:03 +01:00
Wilfried Goesgens cbaa2c3b02 More places to pass along the binaryPath for teh windows 2016-10-12 13:21:38 +02:00
Wilfried Goesgens 54ae758c7c We also need to know the binary directory when looking up the config
file; else we may miscalculate file locations.
2016-10-12 12:03:37 +02:00
jsteemann 89ac2dfba5 don't leak on help 2016-08-31 14:28:23 +02:00
Frank Celler 16c6c2087d added unprepare 2016-06-06 18:27:51 +02:00
Wilfried Goesgens 8eb5bda729 Also notify the windows service facilities if we go down unexpectedly. 2016-06-03 14:30:33 +02:00
Frank Celler 6248f419f1 progress report and windows minidump 2016-04-28 18:59:13 +02:00
jsteemann a3fdda19af Merge branch 'devel' of https://github.com/arangodb/arangodb into devel 2016-04-27 19:17:19 +02:00
Frank Celler 7b83374c65 check ApplicationServer state 2016-04-27 18:01:36 +02:00
jsteemann bfd6fa833d disallow thread creation until ApplicationServer::start() 2016-04-27 16:17:46 +02:00
Frank Celler 4d66f69fb3 added --uid and --gid 2016-04-27 12:08:16 +02:00
jsteemann 0d01f5d5f0 better diagnose cyclic feature dependencies 2016-04-26 23:30:30 +02:00
jsteemann dcc5825f93 cleaned up features a bit 2016-04-24 14:29:29 +02:00
Frank Celler 481f342385 merge fixes 2016-04-23 19:02:21 -07:00
Frank Celler d6e8046992 updated cleanupCFiles 2016-04-23 16:34:57 -07:00
Jan Steemann 104e8e8b9b remove ArangoServer.h remainders 2016-04-22 20:18:28 +02:00
Jan Steemann 7d6994862e fixed startup/shutdown with specific features 2016-04-22 14:44:42 +02:00
Frank Celler 3d2cc31306 WIP 2016-04-11 00:05:37 +02:00
Frank Celler 1b7c47c6bc added --console 2016-04-10 13:47:53 +02:00
Frank Celler e83c1f09b4 WIP 2016-04-02 23:41:21 +02:00
Frank Celler af00417cf4 skeleton arangod 2016-03-25 15:14:43 +01:00
Frank Celler dfa9047484 switch arangosh to new ApplicationFeatures and ProgramOptions 2016-03-08 23:32:43 +01:00