I’m new to mongodb. As I understand it, due to concurrence
, I can’t read and write data to the collection at the same time. Because if I write data in one function and read it in another function, then it constantly reads the values that were written for the first time and can no longer update this data at all. However, if I comment on reading the data, then it writes everything as it should.
How can I get rid of it? I am writing a telegram bot in JS using TeleBot API and deploying it in Vercel.