Skip to content

Transaction timeout error is returned only after hitting Enter #287

@farost

Description

@farost

Description

When running a query that exceeds the transaction timeout (the default value is 5 minutes), the respective error is not returned, and the state of the console is not changed even after 5 or more minutes. If you eventually hit Enter, then the error will be shown, and the state of the Console will be changed:

match ....;

Error executing command: 'match ....;'
[CXN06] Connection Error: The transaction is closed and no further operation is allowed.

Additionally, this error is not really explicit with the cause of this closing. We may lack something on the server side.

Environment

  1. TypeDB distribution: CE
  2. TypeDB version: 3.0.2-rc2
  3. Environment: Mac
  4. Console version: 3.0.2-rc2
  5. Other details:

Reproducible Steps

  1. Set up
define

attribute name,
 value string;
attribute id,
 value string;
entity person,
  owns id @card(0..),
  owns name; 
  1. Execute
    Run long queries. What I've done myself: insert entities, doubling their number with each query. E.g.:
    Start with:
insert $p isa person, has name "Alice", has id "1";

Then:

match $p isa person; insert $p2 isa person, has name "Bob", has id "2";

Repeat the previous query multiple times.

On my machine, I can reach 40k returned answers in one transaction, and the next query may reach the timeout. It's also possible to commit after 40k answers and run 1-2 more queries, one of them will exceed the transaction TTL. Just wait for 5 minutes.

  1. Unexpected result
    The console hangs without returning any messages.

Expected result

An explicit error is returned right after 5 minutes, the console is in the higher-level REPL (so the transaction is closed, there are no queries).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions