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
payload.Deleted=truedeletedPayloadIDs=append(deletedPayloadIDs, payload.ID)
if_, err:=database.DB.Exec(`UPDATE payload SET deleted=true WHERE id=$1`, payload.ID); err!=nil {
logging.LogError(err, "Failed to update payload deleted status")
}
As you can see we doesn't clear cachedUUIDInfoMap when removing payload.
funcLookupEncryptionData(c2profilestring, messageUUIDstring, updateCheckinTimebool) (*cachedUUIDInfo, error) {
//logging.LogTrace("Looking up information for new message", "uuid", messageUUID)//logging.LogDebug("Getting encryption data", "cachemap", cachedUUIDInfoMap)cachedUUIDInfoMapMutex.Lock()
defercachedUUIDInfoMapMutex.Unlock()
if_, ok:=cachedUUIDInfoMap[messageUUID+c2profile]; ok {
// we found an instance of the cache info with c2 profile encryption dataifcachedUUIDInfoMap[messageUUID+c2profile].UUIDType=="callback" {
ifupdateCheckinTime {
UpdateCallbackEdgesAndCheckinTime(cachedUUIDInfoMap[messageUUID+c2profile])
}
}
returncachedUUIDInfoMap[messageUUID+c2profile], nil
} elseif_, ok:=cachedUUIDInfoMap[messageUUID]; ok {
// we found an instance of the cache info with payload encryption dataifcachedUUIDInfoMap[messageUUID].UUIDType=="callback" {
ifupdateCheckinTime {
UpdateCallbackEdgesAndCheckinTime(cachedUUIDInfoMap[messageUUID])
}
}
returncachedUUIDInfoMap[messageUUID], nil
}
But the first part of LookupEncryptionData function check only cachedUUIDInfoMap.
As a result, new callbacks appear even if payload was deleted.
Possible solution: clear cachedUUIDInfoMap when removing payloads.
The text was updated successfully, but these errors were encountered:
I just made a push to help address this - now when payloads are deleted, the cache map is invalidated for entries that start with the payload uuid that was deleted.
As you can see we doesn't clear cachedUUIDInfoMap when removing payload.
But the first part of LookupEncryptionData function check only cachedUUIDInfoMap.
As a result, new callbacks appear even if payload was deleted.
Possible solution: clear cachedUUIDInfoMap when removing payloads.
The text was updated successfully, but these errors were encountered: