Closed orgrimarr closed 2 years ago
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.
wdyt @rashtao?
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:
{"error":true,"errorNum":503,"code":503, ...}
Hi, Any update on this issue ?
Can i contribute ?
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
const test = async function(){ const db = new arangojs.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 } })
}
test() .catch(console.error)
Steps
Error
Proposition