Discussion Forum

Grakn Console Not Returning Results

Hi,
So I just noticed that running queries in Grakn console do not seem to syncd to the current state of the database. If I insert new data while the console is running, and run a query in the console, I do not see the newly added data. but if I quit the console and restart it. then it shows.

Surely this is a bug?

the console starts a transaction on your first query, and finishes the transaction when you type commit. While a transaction is running, you won’t see updates to the database. To exit the transaction and see updates to the database in the console, type commit. Slightly faster than exiting and restarting console

Most sql databases have an autocommit mode that runs when you don’t explicitly start a transaction. In autocommit mode, a sql database commits after every query. grakn does not have an autocommit mode; every transaction must be explicitly started and ended. This is the difference you are seeing

Ok. Good to know. I appreciate the info.