Event firing before data is saved in mapping

We use Moralis as node provider. There is a Smart Contract method, that fires event and writes data in mapping. The sequence is like that - in the same method event is emitted before actual writing (not sure if it matters). We listen for event and then fetch data from Polygon. The issue is that sometimes event is received, but mapping is not updated.
The question is - how can it happen? I suppose something somewhere is not synchronized. We use Moralis as only service. Please let me know if any details are needed to make it more clear & specific

I think that it could happen that you use http speedy nodes and you will not get response from same speedy node that is behind a load balancer and sometimes now all the nodes are perfectly synchronised

Thanks you for the rapid response! Yes, this is my assumption - we use Moralis service but I donโ€™t know how it manages all nodes / fetches data / etc, so that something is not in sync there. Is this the first time for such an issue?

I donโ€™t think that it is the first time, if you try to get last block number using http endpoint you may not get consistent results, with web socket you will get consistent results

ok-ok, got itโ€ฆ Will get back with the result