1
0
Fork 0
arangodb/arangod/RestHandler
Michael Hackstein 36b1d290a9
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
2019-07-19 15:00:30 +02:00
..
RestAdminDatabaseHandler.cpp
RestAdminDatabaseHandler.h
RestAdminExecuteHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestAdminExecuteHandler.h
RestAdminLogHandler.cpp micro optimizations (#9487) 2019-07-17 14:10:18 +02:00
RestAdminLogHandler.h
RestAdminRoutingHandler.cpp
RestAdminRoutingHandler.h
RestAdminServerHandler.cpp refactoring (#9411) 2019-07-09 11:15:52 +02:00
RestAdminServerHandler.h
RestAdminStatisticsHandler.cpp Foxx Security (#8845) 2019-04-25 09:56:29 +02:00
RestAdminStatisticsHandler.h
RestAnalyzerHandler.cpp Bug fix/fix cluster tests for analyzers (#9370) 2019-07-01 16:52:06 +02:00
RestAnalyzerHandler.h
RestAqlFunctionsHandler.cpp
RestAqlFunctionsHandler.h
RestAqlReloadHandler.cpp
RestAqlReloadHandler.h
RestAqlUserFunctionsHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestAqlUserFunctionsHandler.h
RestAuthHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestAuthHandler.h Improved audit logging (#8740) 2019-04-15 14:51:32 +02:00
RestAuthReloadHandler.cpp
RestAuthReloadHandler.h
RestBaseHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestBaseHandler.h Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestBatchHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestBatchHandler.h
RestCollectionHandler.cpp Feature/min replication factor (#9433) 2019-07-19 13:02:28 +02:00
RestCollectionHandler.h
RestControlPregelHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestControlPregelHandler.h
RestCursorHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestCursorHandler.h Improved audit logging (#8740) 2019-04-15 14:51:32 +02:00
RestDatabaseHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestDatabaseHandler.h
RestDebugHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestDebugHandler.h
RestDocumentHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestDocumentHandler.h Feature/min replication factor (#9433) 2019-07-19 13:02:28 +02:00
RestEdgesHandler.cpp
RestEdgesHandler.h
RestEndpointHandler.cpp
RestEndpointHandler.h
RestEngineHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestEngineHandler.h
RestExplainHandler.cpp Bug fix/pass on error messages (#8690) 2019-04-10 12:34:25 +02:00
RestExplainHandler.h
RestGraphHandler.cpp refactoring (#9411) 2019-07-09 11:15:52 +02:00
RestGraphHandler.h
RestHandlerCreator.h
RestImportHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestImportHandler.h
RestIndexHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestIndexHandler.h
RestJobHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestJobHandler.h
RestPleaseUpgradeHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestPleaseUpgradeHandler.h Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestPregelHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestPregelHandler.h
RestQueryCacheHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestQueryCacheHandler.h
RestQueryHandler.cpp Bug fix/pass on error messages (#8690) 2019-04-10 12:34:25 +02:00
RestQueryHandler.h
RestRepairHandler.cpp update velocypack version (#9379) 2019-07-03 12:14:52 +02:00
RestRepairHandler.h
RestReplicationHandler.cpp Bug fix/failover with min replication factor (#9486) 2019-07-19 15:00:30 +02:00
RestReplicationHandler.h Feature/min replication factor (#9433) 2019-07-19 13:02:28 +02:00
RestShutdownHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestShutdownHandler.h
RestSimpleHandler.cpp Bug fix/pass on error messages (#8690) 2019-04-10 12:34:25 +02:00
RestSimpleHandler.h
RestSimpleQueryHandler.cpp
RestSimpleQueryHandler.h
RestStatusHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestStatusHandler.h
RestTasksHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestTasksHandler.h
RestTestHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestTestHandler.h
RestTimeHandler.cpp
RestTimeHandler.h
RestTransactionHandler.cpp New tests for Transaction API (#8996) 2019-05-14 21:40:31 +02:00
RestTransactionHandler.h
RestTtlHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestTtlHandler.h
RestUploadHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestUploadHandler.h
RestUsersHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestUsersHandler.h Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestVersionHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestVersionHandler.h
RestViewHandler.cpp Try to fix corruption error (#9258) 2019-06-25 10:18:26 +02:00
RestViewHandler.h
RestVocbaseBaseHandler.cpp transaction manager tests (#8759) 2019-04-16 21:26:40 +02:00
RestVocbaseBaseHandler.h Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestWalAccessHandler.cpp Feature/comm task refactor (#9426) 2019-07-16 09:43:25 +02:00
RestWalAccessHandler.h