presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/metadata/SchemaDaoUtil.java/SchemaDaoUtil/createTablesWithRetry
class SchemaDaoUtil:    public static void createTablesWithRetry(IDBI dbi)
    {
        Duration delay = new Duration(2, TimeUnit.SECONDS);
        while (true) {
            try (Handle handle = dbi.open()) {
                createTables(handle.attach(SchemaDao.class));
                return;
            }
            catch (UnableToObtainConnectionException e) {
                log.warn("Failed to connect to database. Will retry again in %s. Exception: %s", delay, e.getMessage());
                sleep(delay);
            }
        }
    }