arangojs icon indicating copy to clipboard operation
arangojs copied to clipboard

[Cluster] Clean dead server

Open orgrimarr opened this issue 5 years ago • 1 comments

Environment

  • ArangoJS: 7.2.0
  • ArangoDB 3.7.5 Cluster
    • Tested on docker
    • Tested on windows

Description

Arangojs connected to a cluster in ROUND_ROBIN mode does not clean dead servers from the host list.

Arangojs provide a method : acquireHostList but this function append new coordinator to the host list using addToHostList function.

I suggest to change the acquireHostList function to replace the host list with the list of available server from /_api/cluster/endpoints

orgrimarr avatar Dec 22 '20 22:12 orgrimarr

This would be a breaking change, but I think a compromise would be to add an alternative method (say, updateHostList) that replaces rather than updates the known hosts.

One issue with this is that right now the hosts list is an array and thus hosts are identified by their index, which will cause problems if e.g. a cursor is created from a host which is then removed from the list. This probably requires some internal changes.

pluma avatar Jan 13 '21 14:01 pluma