DB concurrency Issue.

31 views
Skip to first unread message

Sonu Jose

unread,
Dec 1, 2022, 7:08:35 AM12/1/22
to dropwizard-dev
Hi,

I am using dropwizard for an application that runs multiple instances connecting to a
single database. The application is trying to read available Job from table for further 
processing.

I use a filed in the table to identify if the job is taken or available and if taken, which 
application instance holds it.

For connection I use the standard Hibernate. The Issue Im facing is inconsistent reads
due to which 2 instances are taking the job and processing(undesirable), I tried to debug
 using logs but it looks like although the Jobs are being picked few millis apart but the
 update to reserving the job is not committed to database.

Is there some setting that I can enable to handle real time updates to DB, or Am I missing something else?
Reply all
Reply to author
Forward
0 new messages