-
This is a copy of this StackOverflow question. We are using JanusGraph (1.0.0) with a python fastAPI-based API, on kubernetes, to maintain and query our gremlin graph. Using gremlinpython, we periodically send this query for the sole purpose of checking the connection between API and DB server:
Our understanding is that this query is equivalent to sending something like SELECT 1; to a Postgres (other RDBMS exist) server. It creates a traversal with a single value, then collects that value. When we issue this query, we get a warning from the JanusGraph server, like this:
Is our understanding wrong? Does this query actually iterate over our graph (which is not even referenced in this query)? Or is this warning a bug? The problem we have with this warning is that we may well be committing this crime (not using indexes) elsewhere in the code, but there are so many spurious warnings that we will never be able to recognise a real one. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Perhaps there was a bug in 1.0.0, but the query you showed shouldn't trigger this warning at least for the version |
Beta Was this translation helpful? Give feedback.
Perhaps there was a bug in 1.0.0, but the query you showed shouldn't trigger this warning at least for the version
1.1.0
. If it triggers this warning, please, open an issue so that we can take a closer look. However, for now I confirmed thatg.inject(1).next()
is not issuing full-scan warning inmaster
branch (unreleased1.2.0
).In case you can't update to the latest JanusGraph version for any reason, you could use
g.tx().isOpen()
check that should simply returntrue
.In case you want to ensure you never trigger full-scan queries you can set configuration
query.force-index
totrue
and it will issue an exception for any full-scan query.