-
Notifications
You must be signed in to change notification settings - Fork 871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to get function metadata through java API #5779
Comments
Notes on my environment:
|
Hi @metametametameta, anyway in remote the push of configuration is not yet supported, and you have to call the reload for get the updated configuration, you already found the issue for track it : #3496 |
I don't think this issue is a result of remote push not being available. I created the function in the console and even restarted the orient server and all clients after creating the function. So at this point, after restarting the Orient server, and restarting all clients, I would think that odbTx.getMetadata().getFunctionLibrary() should be populated when the remote connection is created from a remote client, but it's not (note that all other metadata is populated). |
This is quite strange, the client is stateless and when restarted load all the information from scratch from the server, and in the server the information are kept updated all the times, just double check if you are connection to the correct server. Regards. |
As far as I know, I'm connecting properly. Are you not able to reproduce the issue? It seems that others have had the same issue as well. See the forum post https://groups.google.com/forum/#!searchin/orient-database/function$20metadata/orient-database/SOfycX4xaD8/U7pdH-tSCwAJ |
Hi, This was due to the missing of update of the metadata in case of changes with queries, this is fixed with push and network changes in 3.0.0, closing |
When acquiring a connection to Orient, function metadata is not populated.
For example:
odbTx.getMetadata().getFunctionLibrary() does not have any functions even though the database has the functions and can be seen through the console or through studio. Even a server restart after function creation does not help, and the function metadata is not populated on connection creation after a server restart.
Note that subsequently calling odbTx.getMetadata().reload() correctly populates the metadata. However, we should not be required to call reload explicitly. The function metadata should be populated when acquiring the connection itself.
Note that the other metadata (indexes, schemas etc.) seem to be populated properly without having to call reload().
I'd also like to make a distinction in the case where the function was created after opening the connection (in which case it makes sense to call reload), but this issue involves opening the connection after the function has already been created.
P.S: Note that the missing function metadata does not prevent us from executing the function in a different way:
odbTx.command(new OCommandFunction("functionName")).execute();
The text was updated successfully, but these errors were encountered: