1
0
Fork 0
Commit Graph

139 Commits

Author SHA1 Message Date
Jan 4d4135d25c
Feature/add dbserver as an alias for primary (#6072)
* add "DBSERVER" as an alias for "PRIMARY"

This allows specifying the value "DBSERVER" for `--cluster.my-role`.
"DBSERVER" is only treated as an alias for "PRIMARY", because several
other parts of the code and APIs use the string "PRIMARY".
Changing these from "PRIMARY" to "DBSERVER" would make the change
downwards-incompatible, which we do not want.

The downside of this alias-only solution is that even when specifying
a role value of "DBSERVER", the server will still report its role as
"PRIMARY", which may be a bit confusing. The server will also generate
its id as "PRMR-XXXX" as before:

    2018-08-03T15:23:09Z [9584] INFO {cluster} Starting up with role PRIMARY
    2018-08-03T15:23:09Z [9584] INFO {cluster} Cluster feature is turned on. Agency version: {"server":"arango","version":"3.4.devel","license":"enterprise"}, Agency endpoints: http+tcp://[::]:4001, server id: 'PRMR-f655b728-4cea-44ac-88e9-8b34baa80958', internal address: tcp://[::1]:8629, role: PRIMARY

* adjusted documentation to use "DBSERVER" instead of "PRIMARY"

* api doc

- secondary role not used anymore. stated.
- primary database is not clear. replaced with dbserver
- brief referenced only dbserver and coordinator - better to provide wider description, in line with what is described below, as other roles can be returned

* typo

* typo

* added starting from 3.4

* additional warning

* cited in the release note
2018-08-06 17:20:50 +02:00
Jan 1c8f6a75dd
Bug fix/fix issue 6076 (#6082) 2018-08-06 14:27:25 +02:00
Max Neunhöffer 014c3f7f53
Only load Plan and Current in ClusterInfo when actually needed. (#5649)
* Only update Plan and Current from Agency if not already done.
* Add read protection for getPlanVersion and getCurrentVersion.
* Add a further check to loadPlan and loadCurrent.
* Fix tests to new behaviour.
* Try to increase Plan/Version and Current/Version with every change.
* Add two more increments of Plan/Version
* Add missing increments in tests for Plan/Version.
* Add changelog entry.
2018-07-16 12:20:13 +02:00
Dan Larkin-York 8b0cb1c657 Restrict cursors to generating user (#5744) 2018-07-03 17:44:15 +02:00
Dan Larkin-York 21e16a8a24 Add load balancer awareness for cursor API (#5682) 2018-07-03 14:29:09 +02:00
Simon 545561e9a9 Read only server (#5652) 2018-07-03 09:58:16 +02:00
jsteemann a14b67f584 use nullptr 2018-05-25 18:55:37 +02:00
Simon 8be273efb8 Replication cleanup (#5105) 2018-04-17 08:17:42 +02:00
Jan 76dcd6ded5
added option `--cluster.require-persisted-id` (#5001) 2018-04-13 11:08:49 +02:00
Jan 7cb115a1a9
remove option `--cluster.my-local-info` (#4999) 2018-04-03 17:34: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 282be208cc
remove TRI_usleep and TRI_sleep, and use std::this_thread::sleep_for … (#3817) 2017-12-06 18:43:49 +01:00
Kaveh Vahedipour 7015db790f replaced all AgencyGeneralTransactions by AgencyWriteTransaction (#3841) 2017-11-29 17:33:24 +01:00
m0ppers 6cbf7159be Feature/server mode (#3590)
* Switching from ttl to supervision based failover mechanism

* Allowing canceling of ongoing actions

* refactored asyncjobmanager

* refactoring some code

* adding read-only flag

* Fixing some bugs

* Fixing tests

* Canceling ongoing operations

* removing some unused code + some asserts

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

* fixing "createsANewDatabaseWithAnInvalidUser"

* Current work

* proper ifs

* Migrate resthandler to c++ and implement mode

* readonly server mode spec test

* Add changelog

* change code so it expects a full object and not just a string

* Fix jslint
2017-11-10 17:56:21 +01:00
Kaveh Vahedipour b09c329a7c fixed 10 min dead time, when bogus --cluster.my-local-info specification (#3643) 2017-11-10 16:05:03 +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
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 3e211f0d9e Fix --cluster.my-local-info (#3481)
* Compatibility for old startup methods.

* removed my-local-info from docs
2017-10-23 12:20:17 +02:00
Simon Grätzer 7c31960cf2 Feature/async failover (#3451) 2017-10-18 23:59:29 +02:00
Max Neunhöffer 9a2385b941 Add host id detection and show in /_admin/cluster/Health. (#3389) 2017-10-11 12:42:44 +02:00
Jan 5165155ed1 Bug fix/fixes 0609 (#3227)
* do not use V8 variant of AQL functions in early optimization stage when a C++ variant is available

* additionally, simplify AQL function definitions and aliases

* warn when more than 90% of max mappings are in use

* added C++ variant of replication catchup

* added `--log.role` option

* updated CHANGELOG

* removed non-existing scheduler.threads option from config

* removed useless __FILE__, __LINE__ invocations

* updated CHANGELOG

* allow a priority V8 context

* remove TRI_CORE_MEM_ZONE

* try to fix Windows errors & warnings

* cleanup

* removed memory zones altogether

* exclude system collections from collection tests
2017-09-13 16:28:21 +02:00
Kaveh Vahedipour c1abc0333d cluster documentation varnish (#2553) 2017-06-12 19:02:11 +02:00
jsteemann 1df46f8923 Merge branch 'devel' of https://github.com/arangodb/arangodb into engine-api 2017-04-21 16:59:32 +02:00
Kaveh Vahedipour 1f81ce28b0 merge in cpp & js from 3.1.18 yet to do tests 2017-04-21 15:41:05 +02:00
Simon Grätzer b304d35ac2 Added rocksdb background thread 2017-04-20 18:50:52 +02:00
Andreas Streichardt e3d8f19368 Fix unused variables 2017-02-13 15:22:58 +01:00
Andreas Streichardt 1bb8f97773 Fix secondaries 2017-02-13 14:00:19 +01:00
Jan Christoph Uhde 16a9ddd78d fix ServerState.cpp 2017-02-10 20:52:26 +01:00
Andreas Streichardt 488b71cf54 Merge branch 'devel' of github.com:arangodb/arangodb into devel 2017-02-10 19:40:51 +01:00
Andreas Streichardt fe07f3515f Fixup registering with agency 2017-02-10 19:35:11 +01:00
jsteemann d024a6d00a remove logging for non-topics 2017-02-10 09:32:50 +01:00
jsteemann ab11410911 Merge branch 'devel' of https://github.com/arangodb/arangodb into engine-api 2017-02-06 13:05:11 +01:00
Kaveh Vahedipour c49c853b01 back ports from 3.1 2017-02-06 10:18:40 +01:00
jsteemann a1b3bfcc80 dont include ServerState when not needed 2017-02-02 10:16:53 +01:00
Kaveh Vahedipour bcfec215b8 tested restart from 3.1 database 2017-01-28 20:32:29 +01:00
Kaveh Vahedipour f98701a598 localId overrules persisted UUID 2017-01-28 12:25:57 +01:00
Kaveh Vahedipour daa1856aa0 localId overrules persisted UUID 2017-01-28 12:05:31 +01:00
Andreas Streichardt 8c8a17528c Fix coordinator case 2017-01-03 16:43:54 +01:00
Andreas Streichardt 8bb3142d19 Rework setRole code 2017-01-03 16:32:43 +01:00
Kaveh Vahedipour a7f88840e7 Fixed redirect issues in AgencyComm 2016-12-14 12:12:00 +01:00
Kaveh Vahedipour 842d1030f0 Fixed dangling UUID problem in missing database directory 2016-12-13 15:36:19 +01:00
Kaveh Vahedipour 3518fb1319 AgencyComm: validation defined in transactions 2016-11-28 16:09:55 +01:00
Kaveh Vahedipour 66951980b6 too much verbosity\! 2016-11-28 09:37:42 +01:00
Kaveh Vahedipour 308545ce79 gcc 4.9.2 problem with move/copy ifstream/ofstream 2016-11-25 16:48:46 +01:00
Kaveh Vahedipour 029ff44bb0 Merge back FMH to devel 2016-11-25 16:03:13 +01:00
Kaveh Vahedipour 4a95e82fa6 ShortName for servers in new ugly UUID world 2016-11-25 15:25:51 +01:00
jsteemann 9e4bb8f20c remove unused variable 2016-11-25 14:33:20 +01:00
Kaveh Vahedipour 41e1ba144f general transactions in agency comm 2016-11-25 09:24:41 +01:00
Andreas Streichardt cfa46180e5 Remove useless variable 2016-11-24 15:22:43 +01:00
kvahed 29b9d9836b Agent configuration raised version number regardless of actual change 2016-11-24 14:20:08 +01:00