Commit 7409913
committed
fix(model-server): writing to a branch using the v1 API failed
Ignite doesn't support nested transactions. Starting a transaction from
inside a transaction throws the following exception:
java.lang.IllegalStateException: Failed to start new transaction (current thread already has a transaction): ...
at org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.txStart0(IgniteTransactionsImpl.java:184)
at org.apache.ignite.internal.processors.cache.transactions.IgniteTransactionsImpl.txStart(IgniteTransactionsImpl.java:70)
at org.modelix.model.server.store.IgniteStoreClient.runTransaction(IgniteStoreClient.kt:139)
at org.modelix.model.server.handlers.RepositoriesManager.mergeChanges(RepositoriesManager.kt:151)
at org.modelix.model.server.handlers.KeyValueLikeModelServer$putEntries$1.invoke(KeyValueLikeModelServer.kt:323)
at org.modelix.model.server.handlers.KeyValueLikeModelServer$putEntries$1.invoke(KeyValueLikeModelServer.kt:316)
at org.modelix.model.server.store.IgniteStoreClient.runTransaction(IgniteStoreClient.kt:140)
at org.modelix.model.server.handlers.KeyValueLikeModelServer.putEntries(KeyValueLikeModelServer.kt:316)
at org.modelix.model.server.handlers.KeyValueLikeModelServer$modelServerModule$1$3$7.invokeSuspend(KeyValueLikeModelServer.kt:163)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.ktor.server.netty.EventLoopGroupProxy$Companion.create$lambda$1$lambda$0(NettyApplicationEngine.kt:296)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
skip-lint1 parent 137f8d7 commit 7409913
File tree
1 file changed
+9
-4
lines changed- model-server/src/main/kotlin/org/modelix/model/server/store
1 file changed
+9
-4
lines changedLines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
143 | 148 | | |
144 | 149 | | |
145 | 150 | | |
| |||
0 commit comments