You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When en arango is in maintenance mode or is starting, it return an error 503.
This error is handled by arangojs, but with ROUND_ROBIN, it should try an other node even if arango does not respond whith LEADER_ENDPOINT_HEADER
This throw an error instead of retrying
Steps to reproduce
Coordinator run on ports 9001, 9002, 9003
Script
constarangojs=require('./build')consttest=asyncfunction(){constdb=newarangojs.Database({url: ['https://127.0.0.1:9001','https://127.0.0.1:9002','https://127.0.0.1:9003'],maxRetries: 3,databaseName: '_system',loadBalancingStrategy: "ROUND_ROBIN",agentOptions: {rejectUnauthorized: false}})db.useBasicAuth('root','')while(true){console.time('test')constcursor=awaitdb.query({query: ` FOR element IN @@collection RETURN element `,bindVars: {"@collection": '_users'}})constresults=[]forawait(constresultofcursor){results.push(result)}console.timeEnd('test')console.log('OK',results.length)}}test().catch(console.error)
I don't think this is a bug. A naked 503 response could mean anything. We would need to make explicit assumptions about whether or not the 503 response without the leader endpoint header means it is safe to retry the request.
I think we can safely retry or failover to another coordinator if the contacted coordinator is starting up or in maintenance mode.
In this case you would get back a 503 response having json body like:
Environment
Description
When en arango is in maintenance mode or is starting, it return an error 503.
This error is handled by arangojs, but with ROUND_ROBIN, it should try an other node even if arango does not respond whith LEADER_ENDPOINT_HEADER
This throw an error instead of retrying
Steps to reproduce
Script
Cluster
Steps
Error
Proposition
The text was updated successfully, but these errors were encountered: