1
0
Fork 0

attempt to improve replication UI in edge cases

This commit is contained in:
jsteemann 2019-10-01 13:09:36 +02:00
parent ca9affc798
commit da9d6cd880
1 changed files with 5 additions and 1 deletions

View File

@ -447,9 +447,13 @@ authRouter.get('/replication/mode', function (req, res) {
let mode = 0;
let role = null;
// active failover
if (endpoints.statusCode === 200 && endpoints.json.endpoints.length) {
if (endpoints.statusCode === 200) {
mode = 3;
role = 'leader';
} else if (endpoints.statusCode === 503) {
// 503 will be returned in case there is a leadership challenge ongoing
mode = 3;
// role unknown
} else {
// check if global applier (ga) is running
// if that is true, this node is replicating from another arangodb instance