Find a Bar for This One
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
A Java/Quarkus batch job meant to sync Foo and Bar database entities contains multiple anti-patterns: it fetches all Foo records instead of only unmatched ones, makes three redundant web service calls inside a single database transaction, manually manages transactions instead of using the framework's @Transaction annotation, and has a misconfigured connection pool. The combination of a flaky web service, long-lived transactions, and multiple concurrent batch jobs causes contention and connection exhaustion. The author notes the correct fix is eliminating the batch job entirely in favor of referentially sound data creation.
Sort: