1
0
Fork 0
Commit Graph

362 Commits

Author SHA1 Message Date
Yuriy Popov 607cc30ba7 Merge branch 'devel' of github.com:arangodb/arangodb into feature/issue-#653-part2 2019-12-03 13:46:08 +03:00
Iurii Popov 77f08b2ec7 decapitalize json in late materialization (#10610) 2019-12-03 13:35:32 +03:00
Yuriy Popov f63db1cb7f Fixed old tests (new field was added) 2019-12-02 19:22:07 +03:00
Simon 6f4ce44716 Rename minReplicationFactor to writeConcern (#10568)
* Rename minReplicationFactor to writeConcern

* fix rest handler

* fix rest handler

* fix some tests

* fix some tests

* modify changelog

* fix suggestions
2019-11-28 20:37:06 +01:00
Wilfried Goesgens b194409654 fix the default case, if we guess that we have structured post data, actually parse it. (#10508) 2019-11-22 15:22:18 +01:00
Andrey Abramov da1b549fe9
Feature/arangosearch 3.6 (#10490)
* backport features from iresearch upstream

* some fixes after upgrade

* fix compilation

* backport the recent changes

* small adjustment

* add missing files

* update iresearch from upstream

* added js tests for new analyzers

* update changelog

* make jslint happy

* update changelog

* fix tests
2019-11-21 19:14:15 +03:00
Iurii Popov 9f4926bfec Feature/issue #653 (#10427)
* late document materialization for view draft

* MaterializeType

* asserts and removed std::function

* std::map -> std::array

* Common search ast nodes code to a separate file

* Unit tests for create and clone a node

* js tests

* tmp unfinished

* Replace variables for late materialization

* Move removing

* Removed wrong clears

* Fixed variable replacement

* removed old tests (for separate materialization)

* check if late materialization arangosearch rule is enabled

* js test. added space

* moved a function to anonym namespace

* Subquery assert

* Review improvements

* Review improvements 2

* View node state to a separate var (microoptimization)

* Fixed index assert

* alignment

* C++ unit tests
2019-11-20 22:11:54 +03:00
Andrey Abramov 0b5fc7fba7
allow in-place analyzer creation via link definition (#10466)
* allow in-place analyzer creation via link definition

* add special handling for _analyzers collection

* modify initial syncer

* address review commments

* fix accidentally broken test
2019-11-19 20:55:45 +03:00
Dronplane 31a580da7b Feature/internal issue #654 (#10456)
* Implemented PHRASE

* Added more tests

* Implemented array recursion

* Fixed tests

* Fixed tests

* Minor comments added
2019-11-18 13:53:05 +03:00
Dronplane a4f2653f4e Feature/internal issue #509 (#10407)
* Added Hint for index creation

* Added tests for proper hint passing

* Added tests

* Added failed link deletion test

* Fixed mmfiles not deleting  failed index

* Fixed cluster run

* Added sync
2019-11-14 18:56:18 +03:00
Andrey Abramov edc8555f17
ArangoSearch index stats (#10421)
* expose ArangoSearch index stats via index figures API

* fix tests

* add tests

* address jslint failures
2019-11-14 18:55:43 +03:00
jsteemann a8ec461b58 fix compile warning in AnalyzerFeature test 2019-11-13 23:32:59 +01:00
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
Iurii Popov 26309c5c96 Feature/issue #642 (#10352)
* Index late materialization draft

* Index late materialization. Refactoring.

* Index late materialization. Expansion draft.

* HashIndexMock

* Refactoring.

* Hash index mock expansion fixes

* Fix compare of attributes.

* Hash index mock. Last expansion support.

* Hash index mock. Take value for array from document, not equal key.

* Optimizations.

* Query tests

* lateMaterialized improvements

* velocypack fixes and tests for index node

* Fix after merge.

* Const expression in a condition test

* Clone tests

* More tests

* Fix for materialized view (nullptr var)

* Fixed index vars registers count planning

* javascript tests

* Fixed cluster tests

* Cluster support

* MaterializeExecutor and MaterializerExecutorInfos refactoring

* More tests

* js tests rocksdb only

* js test. Removed print()

* js testd added skiplist

* C++ unit tests for invalid json

* js test var i

* js tests == -> ===

* iFix js tests ===

* jslint ;

* int unsigned int fix

* double deletion fix

* refactoring

* Added const for collection source

* override final, added materialize namespace, fixed femove in hash index mock

* Removed expansion support. Index can contain null value in case of several object with same fields

* isNumber<>

* Optimization for single collection case

* Renaming

* refactoring

* Unit tests. Added checking documents

* !sliceIt.valid() instead of !(!=)

* Fix primary index (object instead of array)

* Edge collection test

* Windows compilation fix

* IndexExecutor getCallback optimization

* ADB_UNLIKELY

* explainer.js

* removed unsused variable in js test

* fix explainer.js

* do not use several indexes with js test

* Removed several indexes implementation

* space

* fix explainer.js

* fix explainer.js

* code alignment
2019-11-07 19:16:33 +03:00
Simon Grätzer ad7be71095
fix the shit 2019-11-01 15:22:22 +01:00
jsteemann 125dcfffa9 Merge branch 'devel' of github.com:arangodb/arangodb into feature/parallel-aql-phase-one 2019-10-29 13:10:12 +01:00
Andrey Abramov 7541b4d5e6
Bug fix/internal issue #647 (#10292)
* extend replication tests

* ensure proper replication order

* fix tests

* address review comments

* address test failures

* extend dump tests

* fix analyzers tests

* more fixes

* extend tests

* enhance tests

* adjust tests

* use enum instead of flags (part 1)

* cleanup

* use enum instead of flags (part 2)

* get rid of flags for views

* get rid of flags for collections

* completely get rid of collection flags

* fix replication test

* refactor index flags

* fix tests and move AnalyzerPool out of class scope

* fix tests

* adjust log levels

* add tests

* remove debug logging

* remove noexcept from `equalAanalyzer`

* extend cluster tests

* fix cluster tests

* add tests for views and smart graphs

* address jslint errors
2019-10-29 12:09:04 +03:00
Michael Hackstein 1d8bad0a00
Feature/aql modificators cpp test (#10290)
* Adds some tests on AQL Modification blocks (C++)
2019-10-28 15:42:35 +01:00
Simon Grätzer 7ced6b2064
fix wakeup 2019-10-17 19:34:10 +02:00
Wilfried Goesgens de83b5e35c use the default arangosh client connection instead of the simple http client to test the gharial API (#10218) 2019-10-17 13:25:12 +02:00
Dronplane cfce3d8df8 Bug fix/internal issue #627 (#10233)
* Implemented Array IN operators

* First implementation for array comparsion operators for SEARCH clause

* WIP

* WIP

* simplified filter building

* Adding Unit tests

* Added tests for IN/NIN

* Debuggin Array comparsion operators. Fixed ViewNode redundand register planning

* Fixed log id duplicate

* Fixed jslin

* Fixed Mac build

* Code cleanup

* WIP

* WIP

* Code cleanup

* fixed applying boost to all/empty filters

* Removed redundancy in filter generation

* cleanup
2019-10-15 20:41:06 +03:00
Jan Christoph Uhde 99a5749ab7 more vocbase clean up (#10247) 2019-10-15 12:05:02 +02:00
Dan Larkin-York 6fd419714f Move containers into their own folder and namespace. (#10244) 2019-10-14 10:55:55 +02:00
Dronplane a1014ac701 Bug fix/internal issue #600 - Late document materialization (#10006)
* Applied review cAdded sceleton optimizer functionomments

* Added mask for rule

* Applied review cAdded sceleton optimizer functionomments

* Added mask for rule

* adding plan traversal for rule

* Rule execution block developing

* Experiment with additional block

* LIMIT node modifications

* implemented late materialization base version.

* Code cleanup

* Added check for variable usage

* Implemented serialization and cloning

* Fixed build errors

* Implemented late materialization for  LimitNode

* Moved materialization to Sort Node

* Removed LimitNode modiications

* Implemented skipRows to speedup single server

* Added tests for optimizer rule

* fixed build

* Fix mac build

* Fixed mac build

* Fixed PR test run errors

* Added tmp fix for cluster test runs

* removed debug print

* Make materialization stick to last sort node. Add late materialization to explainer

* Updated optimization rule to search optimal SortNode to do materialization

* Refined optimization rules for cluster

* Added tests for SortExecutor and IResearchViewNode

* Fixed  mac buid. Removed misplaced assertion.

* Fixed build

* Updated tests. Coded cleanup

* Code cleanup

* made function name for SortedExecutor match name in ConstraintSortedExecutor

* cleanup

* Fixed test run

* made scoring results stable across cluster

* Make optimize rule stop if  sort node for limit node is not suitable

* Disabled constrained sort for materializing SortNode

* reverted SortNode modifications

* Implemented separate materializer node

* Fixed tests  to account new materialize node

* Code cleanup

* reverted debugging change

* Fixed test jslint error  and comments

* MaterializeNode renamed

* enum value renamed for materialize node

* Code cleanup

* code cleanup and optimization

* Fixed clang warning

* Applied review comments

* Out variable planning moved to materialize node

* inlined getters in ReadContex
2019-10-08 18:38:47 +03:00
Michael Hackstein cf99ff1586
Feature/aql subquery all rows fetcher shadow rows (#10079)
Allow handling of ShadowRows in AllRowsFetcher
2019-10-07 16:49:30 +02:00
Jan 6f14048bbe
implement early pruning of documents in EnumerateCollectionExecutor (#10159) 2019-10-05 13:38:23 +02:00
Tobias Gödderz e2c84acfaf Use explicit default destructors where possible (#10166) 2019-10-04 15:58:30 +02:00
Jan d29d3df698
improve test statements, fix memleaks and init-order-fiasco (#10142) 2019-10-02 16:02:56 +02:00
Dan Larkin-York c21f4c92aa Fix handling of systemdb pointer (warnings). (#10106) 2019-09-30 09:20:25 +02:00
Dan Larkin-York 5204e95512 Add log suppressor utility classes for cleaner test code. (#10088) 2019-09-27 12:57:38 +02:00
Michael Hackstein e89d72d02c
Feature/aql subquery start executor (#10040)
* Add Start/End subquery node skeleton

* Added a test query that triggers complex interna in the future and needs to proof that our work is side-effect free.

* Added first draft of ShadowRow Interface

* Refactored RegisterPlan and pulled it out of the ExecutionNode

* AqlItemBlock now has an additional hidden register to store subquery depth infromation. Right now no shadow rows are created, however thy could now make use of this situation

* Added API and test to insert new shadow rows into an OutputRow.

* Extrated test helper function

* Add template function to statically assert size of type

* Add Start/End subquery node skeleton

* Add Start/End subquery node creation to ExecutionNode

* Cleanup SubqueryEndNode

* Add test file

* Add isEqualTo to ExecutionNode

* Subquery nodes cleanup

* Update ExecutionNode tests

* Added API and tests to consume ShadowRows. Interface is there and compiles with templates, we might need to implement further underlying functions later on as we make progress on ShadowRows, it is only implemented in the minimal way (intentionally)

* Updates to testing code

* Added a test for nested ShadowRows and adapted OutputRow accordingly.

* More updates

* Add optimizer rule

* Fix optimizer rule

* Added additional memory include, seems to be required under GCC not udner CLANG

* it actually helps to save fies before commiting them...

* Fix optimizer rule (again)

* Fixed serialization/Deserialization of AqlItemBlock to contain the hidden subquery register now

* Added a c++ test for AqlItemBlock. It just covers the basics thus far and needs to be improved.

* Fixed toVPack of AqlInputRow for subqueries. Also added serialization / deserialization tests for AqlItemRow

* Added a c++ test for inputAqlItem row serialization => AqlItemBlock deserialization

* Add a public function to get plan from query

* Fix register planning

* Add test for splicing subquery nodes

* add static asserts for sizes of SubqueryStartNode and SubqueryEndNode

* Add comment about statically asserted size

* Fix isEqualTo virtual and override dance.

* Attempt to fix :windows: compile warning

* Fix isEqualTo, remove static_assert_size

* Remove a TODO; the plan owns the ExecutionNodes

* Only add stealPlan to Query when testing

* Remove another static_assert_size

* Fixed mac compile issues

* Initial commit, added class and test stubs

* Added Executor body stub, also added a test for no input. Passes now, as no input is read yet.

* Base implementation + Test of SubqueryStart Executor. First level shadowRows are now produced. Need to add tests for multilevel, and for non-fitting output blocks.

* Added more sophisticated test about shadow row relevance

* Added a test where ShadowRow does not fit into the open block. Also added disabled test on multi level shadowrows. Requires modifications on SingleRowFetcher.

* Added a serialization format to be backwards compatible to 3.5 whenever AQL item blocks need to be send over to remote nodes.

* Handle ShadowAqlItemRow in SingleRowFetcher

* Move some code from header to cpp

* Added more tests for serialization of shadow rows, and fixed a bug revealed by this

* Apply suggestions from code review

Thank you for review!

Co-Authored-By: Tobias Gödderz <tobias@arangodb.com>

* Review comments. Thanks for spotting

* Fixed hidden merge conflicts

* Removed unused variable

* Added first test on ShadowRows in SingleRowFetcher. Found inconvenience in original code with it.

* Added a test for multi level shadow rows

* Added a test and fixed production for multiple consecutirve shadow rows.

* Added tests for pass through blocks and shadow rows

* Attempt to explain windows on how one can actually cast numbers into other number types...

* Adapted RowFetcherHelper to be able to work on ShadowRows

* Seperated assert, to see faster which part is violated

* Fixed minor error in RowFetcherHelper that causes LIMIT tests to error

* Temporarily disabled test suites (sorry there is only one 'test case' in this suites that does all or nothing tests ...) as it tests a feature we cannot support in this intermediate state, we need to default disable our new rule first.

* Improve check of ExecutionState

* Implemented shadow row handling in subquery start executor. Tests not happy yet

* IMplemented missing function to copy over SubqueryDepth between blocks

* Fixed test code of StartExecutor test. It asserted wrongly on releveance of subquery rows.

* Added instanciation of SubqueryStartExecutorTest. Code does not compile.

* Allow to create SubqueryStartExecutors.

* Update arangod/Aql/AqlItemBlockSerializationFormat.h

Co-Authored-By: Tobias Gödderz <tobias@arangodb.com>

* Disabled subquery splice rule by default

* Forgotten merge marker

* temporarily modified test

* temporarily modified test

* Fixed windows compile

* Fixed unused variable warning

* Removed incorrect optimization in SubqueryStartExecutor
2019-09-26 10:01:52 +02:00
Dan Larkin-York a83c2323c9 Refactor ApplicationServer stack (#9965) 2019-09-25 17:31:59 +02:00
Michael Hackstein ca30314c78 Fixed now missing include in test files 2019-09-25 13:24:27 +02:00
Tobias Gödderz 82b0a5e745 De-inline in AQL (#10025)
* Enable IPO (LTO) via CMake

* Use separate IPO_ENABLED variable

* Enabled IPO for more binaries

* Enabled IPO for arangobackup

* Suppress an MSVC warning (though it is not unjustified...)

* Fix static builds, broken due to Policy CMP0060 introduced in cmake 3.3

* Removed policies superseded by minimum cmake version

* Disable IPO with google tests due to a g++ bug

* Disable IPO with google tests only on AUTO

* Disable warning for correct line

* Begin de-inlining Aql

* de-inlining Aql: 2nd batch

* de-inlining Aql: 3rd batch

* de-inlining Aql: 4th batch

* Moved code out of ifdef

* Enabled IPO for additional libs

* Fixed some problems found with IPO enabled

- Fixed ODR violation in Pregel
- Removed unused code in ClusterMethods
- Avoid possible uninitialized variable usage

* Set IPO globally, except for 3rdParty libs

* De-inlined AstHelper again (was undone due to a previous merge conflict)

* Added missing .cpp file

* Fixed compilation with MSVC

* Removed superfluous includes from deinlined AQL header files

* Added includes for size_t

* Deleted outdated files

* De-inlined files that were undone during the merge

* Removed includes from files that were undone during merge

* Fixed merge conflicts
2019-09-25 11:20:03 +02:00
Michael Hackstein 265eb1549d
Feature/aql subquery opt shadow row interface (#9987)
* Added first draft of ShadowRow Interface

* Refactored RegisterPlan and pulled it out of the ExecutionNode

* AqlItemBlock now has an additional hidden register to store subquery depth infromation. Right now no shadow rows are created, however thy could now make use of this situation

* Added API and test to insert new shadow rows into an OutputRow.

* Extrated test helper function

* Added API and tests to consume ShadowRows. Interface is there and compiles with templates, we might need to implement further underlying functions later on as we make progress on ShadowRows, it is only implemented in the minimal way (intentionally)

* Added a test for nested ShadowRows and adapted OutputRow accordingly.

* Added additional memory include, seems to be required under GCC not udner CLANG

* it actually helps to save fies before commiting them...

* Fixed serialization/Deserialization of AqlItemBlock to contain the hidden subquery register now

* Added a c++ test for AqlItemBlock. It just covers the basics thus far and needs to be improved.

* Fixed toVPack of AqlInputRow for subqueries. Also added serialization / deserialization tests for AqlItemRow

* Added a c++ test for inputAqlItem row serialization => AqlItemBlock deserialization

* Attempt to fix :windows: compile warning

* Added a serialization format to be backwards compatible to 3.5 whenever AQL item blocks need to be send over to remote nodes.

* Added more tests for serialization of shadow rows, and fixed a bug revealed by this

* Apply suggestions from code review

Thank you for review!

Co-Authored-By: Tobias Gödderz <tobias@arangodb.com>

* Review comments. Thanks for spotting

* Fixed hidden merge conflicts

* Attempt to explain windows on how one can actually cast numbers into other number types...

* Update arangod/Aql/AqlItemBlockSerializationFormat.h

Co-Authored-By: Tobias Gödderz <tobias@arangodb.com>
2019-09-24 09:09:52 +02:00
Jan Christoph Uhde 0b8c75c7b7 one shard db - devel (#9395) 2019-09-23 15:48:37 +02:00
Tobias Gödderz 4b81ed33b7 Interprocedural optimizations (#9596)
* Enable IPO (LTO) via CMake

* Use separate IPO_ENABLED variable

* Enabled IPO for more binaries

* Enabled IPO for arangobackup

* Suppress an MSVC warning (though it is not unjustified...)

* Fix static builds, broken due to Policy CMP0060 introduced in cmake 3.3

* Removed policies superseded by minimum cmake version

* Disable IPO with google tests due to a g++ bug

* Disable IPO with google tests only on AUTO

* Disable warning for correct line

* Enabled IPO for additional libs

* Fixed some problems found with IPO enabled

- Fixed ODR violation in Pregel
- Removed unused code in ClusterMethods
- Avoid possible uninitialized variable usage

* Set IPO globally, except for 3rdParty libs
2019-09-18 11:29:37 +02:00
Jan aada04e75b
don't assert/crash when using an unknown collection/shard (#9959) 2019-09-11 12:03:13 +02:00
Jan 9f078f363d
Bug fix/harden database creation against duplicate name (#9951) 2019-09-09 11:00:33 +02:00
Michael Hackstein 1580b34c83
Bug fix/refactor i research query optimization test (#9920)
* Prepared a setup phase for QueryOptimization test. This is prerequisite to split up the test case in order to reduce compile time

* Splitted ireesearch query optimization test into mutliple test cases.
2019-09-05 16:10:37 +02:00
Markus Pfeiffer 753ff4aa67 Feature/atomic database creation 2 (#9826) 2019-09-05 12:38:07 +02:00
Jan 5572675106
Bug fix/remove base directory from include path (#9885) 2019-09-04 17:39:01 +02:00
Dronplane 3bba2cd7db 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>
2019-09-03 15:03:49 +03:00
Simon 9a43b28f8f Improve ExecContext usability (#9806) 2019-08-28 19:05:23 +02:00
Dronplane 622d7a3edf Bug fix/issue #9795 (#9825)
* Fixed NOT IN clause in ArangoSearch

* Update CHANGELOG
2019-08-28 14:43:04 +03:00
Dronplane 49dfb0a96e 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
2019-08-20 19:34:23 +03:00
Dronplane 2f6fb109f6 Bug fix/issue #9652 (#9697)
* Fixed analyzer properties equality check.

* Added re-normalization of stored analyzer properties

* Fixed analyzer name rules in rest and v8 handlers

* Fixed linux build

* Added tests for implicit system db name. Code cleanup.

* Analyzers access logic moved to separate function
2019-08-15 17:42:44 +03:00
Kaveh Vahedipour e91cc66b9e forward ported node corrections from 3.4 (#9700)
* forward ported node corrections from 3.4
* tests fixed
2019-08-15 15:48:49 +02:00
Andrey Abramov facc9c6435
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
2019-08-13 22:48:55 +03: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