Understanding GetAllHistoryTreeBranches

We observed a job being executed around 12:00 AM & 12:00 PM UTC everyday. This job frequently uses GetAllHistoryTreeBranches query and at the end of the job the latency seems to increase to 17-18 seconds at which point the job stops and the persistence layer seems to have certain write timeouts. Can anyone help us understand if there is something we can do to identify the root cause for this?

Hi, what persistence layer do you use?

GetAllHistoryTreeBranches is used for background scanning and GC (history scavenger). What is your namespace retention set to (days)?
Whats the server version you use?

Hi @tihomir,
Please find the details below.
Persistence layer: Cassandra
Retention is set to 5 days.
Server version: 1.18.1