1
0
Fork 0
arangodb/arangod/ClusterEngine
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
..
CMakeLists.txt Refactorings from cluster trx improvement branch (#8391) 2019-03-14 23:13:17 +01:00
ClusterCollection.cpp less locking for ClusterSelectivityEstimates (#8892) 2019-05-06 13:22:36 +02:00
ClusterCollection.h refactoring (#9411) 2019-07-09 11:15:52 +02:00
ClusterEngine.cpp bug-fix/internal-issue-#609 (#9464) (#9520) 2019-07-19 14:01:33 +03:00
ClusterEngine.h bug-fix/internal-issue-#609 (#9464) (#9520) 2019-07-19 14:01:33 +03:00
ClusterIndex.cpp don't unfairly favor the edge index when comparing it to more specialized indexes on `_from`/`_to` plus other attributes (#9362) 2019-07-01 16:32:42 +02:00
ClusterIndex.h clean up usage costs (#9237) 2019-06-26 17:01:22 +02:00
ClusterIndexFactory.cpp Forbid indexes on _id (#9337) 2019-06-28 11:11:22 +02:00
ClusterIndexFactory.h issue 526.1: initial support for vocbase-prefixed analyzer names (#8319) 2019-03-06 15:13:19 +03:00
ClusterRestCollectionHandler.cpp big reformat 2018-12-26 00:54:03 +01:00
ClusterRestCollectionHandler.h big reformat 2018-12-26 00:54:03 +01:00
ClusterRestExportHandler.cpp big reformat 2018-12-26 00:54:03 +01:00
ClusterRestExportHandler.h big reformat 2018-12-26 00:54:03 +01:00
ClusterRestHandlers.cpp big reformat 2018-12-26 00:54:03 +01:00
ClusterRestHandlers.h Coordinator storage engine (#5405) 2018-05-22 19:30:27 +02:00
ClusterRestReplicationHandler.cpp cleanup replication contexts (#8630) 2019-04-01 09:35:08 +02:00
ClusterRestReplicationHandler.h Bug fix 3.5/min replication factor (#9524) 2019-07-22 17:48:34 +03:00
ClusterRestWalHandler.cpp Refactorings from cluster trx improvement branch (#8391) 2019-03-14 23:13:17 +01:00
ClusterRestWalHandler.h big reformat 2018-12-26 00:54:03 +01:00
ClusterSelectivityEstimates.cpp Bug fix/adjust 3.5 rc3 (#9146) 2019-05-30 23:20:33 +03:00
ClusterSelectivityEstimates.h less locking for ClusterSelectivityEstimates (#8892) 2019-05-06 13:22:36 +02:00
ClusterTransactionCollection.cpp Bug fix/pass on error messages (#8690) 2019-04-10 12:34:25 +02:00
ClusterTransactionCollection.h Bug fix/pass on error messages (#8690) 2019-04-10 12:34:25 +02:00
ClusterTransactionState.cpp Try to fix corruption error (#9258) 2019-06-25 10:18:26 +02:00
ClusterTransactionState.h Refactorings from cluster trx improvement branch (#8391) 2019-03-14 23:13:17 +01:00
ClusterV8Functions.cpp Feature/upgrade v8 7.1.302.28 (#8088) 2019-02-19 11:15:34 +01:00
ClusterV8Functions.h Coordinator storage engine (#5405) 2018-05-22 19:30:27 +02:00
Common.h big reformat 2018-12-26 00:54:03 +01:00
MMFilesMethods.cpp The Legendary El Cheapo (#8485) 2019-03-22 11:38:33 +01:00
MMFilesMethods.h big reformat 2018-12-26 00:54:03 +01:00
RocksDBMethods.cpp The Legendary El Cheapo (#8485) 2019-03-22 11:38:33 +01:00
RocksDBMethods.h big reformat 2018-12-26 00:54:03 +01:00