You are not logged in.
In a recent post, a user got, "error: could not open file /var/lib/pacman/sync/core.db: Unrecognized archive format" and the solution was to do a pacman -Syuu. Found several similar posts in the forum.
The archwiki Mirrors page says
Check the status of the mirrors by visiting the Mirror Status page. It is recommended to only use mirrors that are up to date, i.e. not out of sync.
How are others checking the status before doing an update to proactively prevent the above? rankmirrors?
Offline
I check if chosen mirror is not 'out of sync' and don't have 'syncing error log' here: https://archlinux.org/mirrors/status/
Also 'completion' should be 100% and 'delay' time low.
Offline
There's https://wiki.archlinux.org/title/Reflector if you want to automate this. But I personally pick a few I know to be good and keep them at the top of my list. Also helps that I'm close enough that the tier 1s in germany are actually a good option in general.
Online