We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Bug severity 3
Describe the bug There is an error that will be thrown by TypeORM when you try to delete multiple VCs in a short period of time.
To Reproduce Run the following code:
const vcAmount = 1000; const vcHashes: string[] = []; for (let i = 0 ; i < vcAmount ; i++) { const vc = await agent.createVerifiableCredential({ credential: { issuer: { id: "<a stored DID>" }, credentialSubject: { id: "did:some:random-did", payload: i } }, proofFormat: "jwt" }); const hash = await agent.dataStoreSaveVerifiableCredential({ verifiableCredential: vc }); vcHashes.push(hash); } for (let i = 0 ; i < vcHashes.length ; i++) { try { await agent.dataStoreDeleteVerifiableCredential({ hash: vcHashes[i] }); } catch (error) { console.log("index:", i); console.log(error); break; } }
Observed behaviour The following error will be thrown for a random VC:
index: 100 QueryFailedError: SQLITE_CONSTRAINT: FOREIGN KEY constraint failed at new QueryFailedError (.../src/error/QueryFailedError.ts:11:9) at Statement.handler (.../src/driver/sqlite/SqliteQueryRunner.ts:79:26) at Statement.replacement (.../node_modules/sqlite3/lib/trace.js:25:27) { errno: 19, code: 'SQLITE_CONSTRAINT', __augmented: true, query: 'DELETE FROM "credential" WHERE "hash" = ?', parameters: [ 'e75b34ce33e56cb0cb522b13804ecfd1ea9ad847f7bf078d06414ba6aab0a8de268c5a96dc2934ea4da477ec97d8e9f7732899be8c43b92736b439fef00b7b1a' ] }
Expected behaviour No error will be thrown and all VCs are deleted.
Additional context I've also added it into our discussion here.
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered:
Can you try with version 2.0.2-next.15 ? I believe this was fixed in #652
2.0.2-next.15
Sorry, something went wrong.
works like a charm 👍
mirceanis
No branches or pull requests
Bug severity
3
Describe the bug
There is an error that will be thrown by TypeORM when you try to delete multiple VCs in a short period of time.
To Reproduce
Run the following code:
Observed behaviour
The following error will be thrown for a random VC:
Expected behaviour
No error will be thrown and all VCs are deleted.
Additional context
I've also added it into our discussion here.
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: