From 2b5f12d4ab909deff8f46e34edc8644910b5d79a Mon Sep 17 00:00:00 2001 From: Emilio Date: Wed, 28 Aug 2024 11:24:02 -0400 Subject: [PATCH] GEOMESA-3388 Add retry on Accumulo table creation (#3159) --- .../org/locationtech/geomesa/accumulo/util/TableManager.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/util/TableManager.scala b/geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/util/TableManager.scala index b7b47d4d127..a18e41ede8f 100644 --- a/geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/util/TableManager.scala +++ b/geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/util/TableManager.scala @@ -157,7 +157,7 @@ object TableManager { tableCache.get(table, _ => { withLock(tablePath(table), timeoutMillis, { val tableOps = client.tableOperations() - if (!tableOps.exists(table)) { + while (!tableOps.exists(table)) { try { tableOps.create(table, new NewTableConfiguration().setTimeType(timeType)) created = true @@ -182,7 +182,7 @@ object TableManager { nsCache.get(ns, _ => { withLock(nsPath(ns), timeoutMillis, { val nsOps = client.namespaceOperations - if (!nsOps.exists(ns)) { + while (!nsOps.exists(ns)) { try { nsOps.create(ns) } catch { case _: NamespaceExistsException => onNamespaceExists(ns) }