From f49679bd88fa1c052d49a10bf75b549c246ef8a5 Mon Sep 17 00:00:00 2001 From: Ralph Gasser Date: Mon, 12 Aug 2024 13:54:20 +0200 Subject: [PATCH] Removed transaction support from CottontailConnection (for now). --- .../plugin/cottontaildb/CottontailConnection.kt | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/CottontailConnection.kt b/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/CottontailConnection.kt index 76eeab3c..e363ffc4 100644 --- a/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/CottontailConnection.kt +++ b/vitrivr-engine-module-cottontaildb/src/main/kotlin/org/vitrivr/engine/plugin/cottontaildb/CottontailConnection.kt @@ -45,16 +45,8 @@ class CottontailConnection(provider: CottontailConnectionProvider, schemaName: S */ @Synchronized override fun withTransaction(action: (Unit) -> T): T { - val transactionId = this.client.begin() - try { - val ret = action.invoke(Unit) - this.client.commit(transactionId) - return ret - } catch (e: Throwable) { - this.client.rollback(transactionId) - LOGGER.error(e) { "Failed to execute action in transaction due to erro.." } - throw e - } + LOGGER.warn { "Transactions are not supported by Cottontail DB. Ignoring transaction." } + return action.invoke(Unit) } /**