Greetings, we have a script which imports a large amount of data into OrientDB. Several of the step use the java API to access indices. We have an ODatabaseDocument instance
db and we do the following:
OIndex<?> index = db.getMetadata().getIndexManager().getIndex(“MyIndex”);
This is happening deep down in a loop. During one of the loop iterations, index is randomly coming back as
null. This very same index was used several times over in prior iterations of the loop. So we know the index is there, and that there is not a typo or issue with the schema.
After the error logging into the UI we can still issue a Query like:
SELECT FROM INDEX:MyIndex WHERE key = "some-key";
And it will complete just fine. To me this indicates that the index was, and still is, in the database. Is there any reason why the index would randomly come back null?
I should note that we are using a pooled database connection.