hyperledger-labs / business-partner-agent

The Business Partner Agent is a SSI wallet and controller based on aries cloud agent python.
https://labs.hyperledger.org/business-partner-agent/
Apache License 2.0
56 stars 48 forks source link

Deleting a partner blows up the memory/BPA #815

Closed etschelp closed 1 year ago

etschelp commented 1 year ago

Deleting a partner also deletes all exchanges in acapy, as acapy has no paging implemented on the xxx/records endpoints the BPA simply loads all exchanges into memory before deleting them to get the exchange ids, this is a bad idea as the amount of exchanges can become quite substantial. There are two possible solutions:

  1. extend acapy to support paging on all endpoints that deal with exchanges
  2. store a reference to the exchange in the BPA and use micronauts paging mechanism when deleting records

1 is probably a good idea in any case. 2 is faster to implement.

etschelp commented 1 year ago

fixed with: https://github.com/hyperledger-labs/business-partner-agent/pull/817