Memcache storage service does not correctly delete contexts

Description

While running the memcached server in verbose mode to inspect the traffic being sent to it from Shibboleth, I noticed that MemcacheStorageService::deleteContext does not correctly delete the individual elements from the context.

Below is sample memcached traffic generated by a call to MemcacheStorageService::deleteContext() to delete a session context with a single key, "session":

<28 get myprefix:_f9adc362f039c2d354da22960d9ad3bf >28 sending key myprefix:_f9adc362f039c2d354da22960d9ad3bf >28 END <28 delete myprefix:_f9adc362f039c2d354da22960d9ad3bfsession >28 NOT_FOUND <28 delete myprefix:_f9adc362f039c2d354da22960d9ad3bf >28 DELETED

The context map correctly lists the "session" field, but there is a ":" missing between the context ID and the keys to be deleted:

for (list<string>::const_iterator iter = contents.begin(); iter != contents.end(); ++iter) { string final_key = map_name + *iter; deleteMemcache(final_key.c_str(), 0); }

Session data that otherwise would have been deleted therefore stays present on the memcached host, causing unnecessary resource pressure.

Environment

None

Activity

Scott Cantor
May 11, 2016 at 2:04 AM

aac629d04087e8bfdf0fd9caced172b2023cb83a

I assume all that's needed is adding the colon between the two halves. I didn't write the plugin and don't have any experience with it, so I'm not too familiar with the workings.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Created May 2, 2016 at 3:52 PM
Updated June 29, 2016 at 4:22 PM
Resolved May 11, 2016 at 2:04 AM