This article explains how to find and clear stale entries in Arango DB.
Symptoms 1: I am unable to delete the site, and checking the tssm logs and kibana logs indicate that the error is received from the topology-service ( note: the topology service data is saved in Arango DB).
Symptoms 2: When trying to list departments under Admin Portal > Resources > Shared Object > Departments, I receive the 500 Internal Error and the department is not listed (the list department request is also served from Arango DB).
It is seen that stale/null entries in Arango DB may result in the above symptoms.
To find and clear stale or null entries in Arango DB, perform the following steps:
Copy the above script to any of the central/regional infra VMs in the /tmp location. Execute and run the script as follows:
/tmp
chmod +x query_null_refs_pr35987.sh ./query_null_refs_pr35987.sh
When prompted, supply the Arango DB password for the system. (To obtain the Arango DB password, log in to the installer VM, navigate to the CSO installer directory, and type the command ./python.sh deploy_manager/utils/decrypt_password.py .)
./python.sh deploy_manager/utils/decrypt_password.py
set
const REMOVE_NULL_REFS = true
Run the script again to remove the null references by using the ./query_null_refs_pr35987.sh command.
./query_null_refs_pr35987.sh
Note : No downtime is required to run this script.