public static void onDuplicateKeyIgnore(final Runnable runnable) {
        try {
            runnable.run();
        } catch (RuntimeException e) {
            if (isDuplicateKeyException(e)) {
                LOGGER.debug(e::getMessage, e);
            } else {
                // Some other error so just re-throw
                LOGGER.error(e::getMessage, e);
                throw e;
            }
        }
    }
Check that the datasource is not currently being used by the current thread. The main point of this check is to
ensure that operations on a datasource are not nested as this can lead to exhaustion of connections from a
datasource connection pool and produce a deadlock. It is generally ok for separate threads to get connections
from the datasource as a connection should become available once one thread has released a connection back to the
pool. However, nested calls, particularly recursive ones, will quickly starve a connection pool and lock the
system.

@param dataSource The datasource to check.
stroom-db-util/src/main/java/stroom/db/util/JooqUtil.java