-
Notifications
You must be signed in to change notification settings - Fork 8
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
Java sdk batchCheck does not do a batch check #127
Comments
Hey @lucasmarcelli, We're currently in the process of working to update the SDKs to use the BatchCheck API endpoint. So, the |
Thanks. Is there a task/issue? |
I ask because I may have capacity to make this change in the java SDK if nobody has picked it up yet. |
@lucasmarcelli thanks for that offer! We don't currently have this work broken down yet as we're finalizing our plans for it (we plan to maintain the same API interface and map the request/response internally). But I've raised your interest to the team so that we can be sure to let you know when we have that issue filed. |
If anyone is interested in contributing, the pattern we are following for the new server batch check is:
I know that's a lot of info 😅, it may be easier to refer to the JS or Python PRs to see the pattern :) If anyone would like to pick this up before we get to it, feel free to assign this issue to yourself and we can assist as needed! |
Checklist
Description
Not sure if this is a bug per se, but the
batchCheck
function is not hitting the batch check endpoint on FGA. Rather, it's making several individual requests in parallel. If we make 30 checks in a batch check, with the default settings, it makes up to 10 parallel requests of single batch checks at a time until all 30 are checked.We were having performance issues and noticed that this is happening, with context timeouts being hit after the 14th or 15th tuple check and the rest coming back null. We were able to mitigate this by increasing our db memory.
Is the way this works intentional? I'm planning to try hitting the actual batch endpoint in openfga manually to see if the performance is improved at all, but wanted to check here as well.
java-sdk/src/main/java/dev/openfga/sdk/api/client/OpenFgaClient.java
Lines 582 to 621 in 5713a50
Expectation
batchCheck
should hit the batch endpoint in openfga.Reproduction
OpenFGA SDK version
0.4.x
OpenFGA version
1.5.9
SDK Configuration
i'm not sure what this means
Logs
No response
References
No response
The text was updated successfully, but these errors were encountered: