Help me understand the work with the database, on the 3-5 iteration, data is incorrectly written to the database in the lemma table, the site is correctly recorded, the page is also, but when lemma then records in the database are different.
I am writing a search engine, the program works as follows, a rest request is sent, and sites are parsed in parallel, collecting page, and lemma, the work is performed in parallel, each site in its own thread, and each site additionally using forkjoin parses pages and immediately saves lemma in the database, but at the end of the program the number of lemma is different. I found out that in the insertLemmasToTable method, the text variable has different values, for this I wrote code for testing, where I found out that the text variable has different values. The extractWordsFromUrl method collects all words from html, and it is here that different data on the 3-5 restart of the program.
text Total Word Count: 77829 Total Word Count: 77829 Total Word Count: 77855
I installed synchronized blocks




