From 2f5ebceb06a64ab46bc46bf16259ca4b7318d2cf Mon Sep 17 00:00:00 2001 From: Emilio Lahr-Vivaz Date: Wed, 28 Aug 2024 10:43:10 -0400 Subject: [PATCH] Add re-try on Accumulo table creation --- .../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 b7b47d4d1279..a18e41ede8f8 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) }