You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a customer is created the CustomerPathElementRepository cache must be invalidated. The CreateCustomer request should implement IInvalidateCaches to do this. If Customer details are stored in any other API caches these should be invalidated too.
The caches are not currently invalidated on CustomerCreation, which can lead to unexpected behaviour when ingesting assets - the ingest should succeed but fails when raising a notification as the notification looks up Customer name and path.
Below are some notes from investigating this - note that there is nothing logged that explains the 500. We should add a 'catch-all' exception handler to log unexpected exceptions.
The behaviour seen was:
Asset PUT received
Logs show successful authentication
Logs show "Asset Created" notification raised
Final status code is 500
Looking at asset in DB shows asset is "ingesting" and incomplete
Engine is never called
Example log for CorrelationId 19cfdba1-4528-47e3-bae4-650e34468c00:
[06:27:10 DBG API.Auth.DlcsBasicAuthenticationHandler 19cfdba1-4528-47e3-bae4-650e34468c00] Using JWT with customer id 100
[06:27:10 DBG API.Auth.DlcsBasicAuthenticationHandler 19cfdba1-4528-47e3-bae4-650e34468c00] AuthenticationScheme: Basic was successfully authenticated.
[06:27:10 DBG API.Infrastructure.Messaging.AssetNotificationSender 19cfdba1-4528-47e3-bae4-650e34468c00] Message Bus: Asset Created: 100/1/62-Portrait_of_Erasmus_by_Hans_Holbein_d._J.-Kunstmuseum_Basel.jpg
[06:27:10 ERR Serilog.AspNetCore.RequestLoggingMiddleware 19cfdba1-4528-47e3-bae4-650e34468c00] HTTP PUT /customers/100/spaces/1/images/62-Portrait_of_Erasmus_by_Hans_Holbein_d._J.-Kunstmuseum_Basel.jpg responded 500 in 12.1987 ms
The text was updated successfully, but these errors were encountered:
donaldgray
changed the title
Customer lookup cache must be invalidated when customer created
Customer lookup cache not invalidated when customer created
Nov 21, 2024
When a customer is created the
CustomerPathElementRepository
cache must be invalidated. TheCreateCustomer
request should implementIInvalidateCaches
to do this. If Customer details are stored in any other API caches these should be invalidated too.The caches are not currently invalidated on CustomerCreation, which can lead to unexpected behaviour when ingesting assets - the ingest should succeed but fails when raising a notification as the notification looks up Customer name and path.
Below are some notes from investigating this - note that there is nothing logged that explains the 500. We should add a 'catch-all' exception handler to log unexpected exceptions.
The behaviour seen was:
Example log for CorrelationId
19cfdba1-4528-47e3-bae4-650e34468c00
:The text was updated successfully, but these errors were encountered: