-
Notifications
You must be signed in to change notification settings - Fork 23
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
Mutex is not locked - inside search call #244
Comments
Hi @falkorichter, thank you for reporting this. Unfortunately, I couldn't reproduce the issue! Does the exception show up in the latest version of the library too? And can you please provide a code snippet to reproduce the error? Thank you! |
This is the stacktrace we´re getting:
We are basically just wrapping your SDK:
and |
Hi I got the same issue, it seems to come from Ktor logging as per Kotlin/kotlinx.coroutines#2683, can you disable it? obfuscated stack trace for reference:
Thanks, |
I´m no longer on the project, I pinged the team to follow up on it. |
Hi @CoreFloDev, thanks a lot for your reply! this is exactly the issue we're facing. We're now passing the following to our
which seems to prevent the logging code in ktor from running. That was extremely helpful, thanks again! |
But that's just an hotfix, they shouldn't have any logging code at all on prod as it slows down a bit every request and take space in the apk for nothing |
@aallam Can you also please remove that logging lib from the ktor production instance? please see https://ktor.io/docs/client.html#features for reference You can keep it for development if you need it but it doesn't make sense to have it running on prod as per: Line 32 in 19b8db8
Thanks Flo |
Hi @CoreFloDev, by default, the logging level is |
@aallam yes, it is still happening in production even with the |
@CoreFloDev thank you for your reply, that was insightful. |
in which version this issue got fixed? |
@parthm1015 starting from 1.10.0 |
@aallam i updated the algolia version to 1.10.0 but still i am getting errors. But i also observed that logging level i have kept is |
can any one help me with this? |
Hi @parthm1015, yes, you need to use |
We´re seeing quite some
IllegalStateException Mutex is not locked
in the 1.5.0 of the Algolia SDK in our Android app. The stack trace indicates like there is little of our code involvements.
We have a suspicion this relates to two consecutive calls to
com.algolia.search.client.Index.search()
in a clean Android with Kotlin Coroutines Environment. All searches run in the same coroutine context.We are puzzled, We would suspect that the Mutex is there to limit parallel requests, but since the unlocking failes in the
public suspend inline fun <T> Mutex.withLock(owner: Any? = null, action: () -> T): T {
the unlock fails:
The text was updated successfully, but these errors were encountered: