1
0
Fork 0

attempt to improve replication UI in edge cases (#10125)

This commit is contained in:
Jan 2019-10-01 17:40:19 +02:00 committed by KVS85
parent 2201381da9
commit 7893f178a0
1 changed files with 5 additions and 1 deletions

View File

@ -451,9 +451,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