typedb / typedb-studio

TypeDB Studio (IDE)
https://typedb.com
Mozilla Public License 2.0
191 stars 43 forks source link

Studio crash on closed transaction #634

Open flyingsilverfin opened 1 year ago

flyingsilverfin commented 1 year ago

Description

We were running server and having an open transaction from Studio connected, if the server is shut down or rebooted, we can crash Studio (not reproduced -- this is the original case description).

Environment

  1. TypeDB version: 2.11.1
  2. OS of TypeDB server: Mac
  3. Studio version: 2.11.0
  4. OS of Studio: Mac
  5. Other environment details:

Reproducible Steps

Didn't reproduce, but here is is the best-effort steps to cause the crash:

  1. boot server
  2. open studio, connect to a database & open a transaction
  3. shut down server
  4. start server
  5. try to connect to the same database again in Studio

Expected Output

Reconnecting should be work seamlessly

Actual Output

Title: [CLI03] Client Error: The transaction has been closed and no further operation is allowed.
Trace: com.vaticle.typedb.client.common.exception.TypeDBClientException: [CLI03] Client Error: The transaction has been closed and no further operation is allowed.
    at com.vaticle.typedb.client.stream.ResponseCollector$Queue.take(ResponseCollector.java:74)
    at com.vaticle.typedb.client.stream.ResponsePartIterator.fetchAndCheck(ResponsePartIterator.java:56)
    at com.vaticle.typedb.client.stream.ResponsePartIterator.hasNext(ResponsePartIterator.java:86)
    at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Unknown Source)
    at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
    at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
    at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
    at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
    at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
    at java.base/java.util.stream.ReferencePipeline.findAny(Unknown Source)
    at com.vaticle.typedb.studio.state.schema.TypeState.loadSubtypesExplicit(TypeState.kt:115)
    at com.vaticle.typedb.studio.state.schema.TypeState$Thing.reloadEntries(TypeState.kt:177)
    at com.vaticle.typedb.studio.framework.material.Navigator$ItemState.reloadEntries$framework_material_material(Navigator.kt:189)
    at com.vaticle.typedb.studio.framework.material.Navigator$ItemState.expandRecursive(Navigator.kt:177)
    at com.vaticle.typedb.studio.framework.material.Navigator$ItemState.access$expandRecursive(Navigator.kt:123)
    at com.vaticle.typedb.studio.framework.material.Navigator$ItemState$expandRecursive$1$1.invokeSuspend(Navigator.kt:180)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
alexjpwalker commented 1 year ago

Related: