Inconsistent counters, tags and last seen dates

I’m seeing a lot of inconsistencies in our On-Premise Sentry installation. Being a new user, I can include only one image in my post, so I’ll try to describe it verbally.

For example:

  1. There are custom tags on Details tab of an event, but Tags tab is empty.
  2. Filtering by user tag doesn’t work. Clicking on a tag in existing events leads to filter page that says “no events match your filters”.
  3. Last seen date is incorrect (lagging by a day or more):

I assume all these issues are connected and caused by some inconsistency in Sentry storage. How do I investigate and fix this?