-
Notifications
You must be signed in to change notification settings - Fork 17
Description
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
- TypeDB distribution: CE
- TypeDB version: 3.0.2-rc2
- Environment: Mac
- Console version: 3.0.2-rc2
- Other details:
Reproducible Steps
- Set up
define
attribute name,
value string;
attribute id,
value string;
entity person,
owns id @card(0..),
owns name;
- 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.
- 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).