-
Notifications
You must be signed in to change notification settings - Fork 204
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
Multiple records found for given query for recordType: DidCommMessageRecord #2142
Comments
Hmm. In this case, why is the same record being stored twice? Something must trigger the issuer to receive/process the same request credential message twice. I think it should usually catch this as it's a race condition. This is a limitation of Askar as we can't really prevent this with an unique constraint on the database level. Could you debug where in the code these two messages are stored? And why it's called twice? We store the didcomm message record using saveOrUpdate (
Happy to dive into this more if you can provide more details |
Thank you for the enthusiasm
We are not explicitly interfering as such with the process, once we initiate and create an offer(using existing connection), the flow completes as usual between issuer and holder(connected via mediator).
Yess, I'll debug it further, however, this might take some time as reproducing this requires a significant number of parallel holders completing the flow multiple times
Okay, so this shouldn't require any additional configurations, right? I'll debug and share the logs soon. |
Currently we don't support transactions and locking yet. It should be relatively simple to support:
Something like: storageService.transaction((sessionStorageService) => {
const existing = await sessionStorageService.findByID('id', {lock: true})
if (!existing) {
sessionStorageService.save()
} else {
sessionStorageService.update()
}
}) |
What
When trying to issue credential in bulk, the issuer seems to be getting multiple records for
DidCommMessageRecord
in stateaccept-request
Here is a sample query which return a duplicate record at DidCommMessageRepository
which return the following records,
Records found
Some Javascript
I'm unsure if this is an implementation issue (##), or if we should simply return the first found record or add a separate
findByQuery
in DidCommRepository(##)I think this might an implementation issue because a request even received twice should not create records with similar
associateId
andthreadId
I was thinking if something similar to this #1495 might be done
The text was updated successfully, but these errors were encountered: