Looping storage service writes and deletes ?
Cantor, Scott
cantor.2 at osu.edu
Tue Dec 9 18:16:19 EST 2014
On 12/9/14, 10:32 PM, "Tom Zeller" <tzeller at dragonacea.biz> wrote:
>
>When writing or deleting consent storage records, should I attempt the
>write or delete once or loop several times like
>StorageBackedIdpSession.saveAuthenticationResultToStorage() ?
THe loops are to deal with version/concurrency errors.
>Not a big deal, but, when maintaining the index record whose value is
>the storage keys for the storage context, it's possible for the value
>to be empty, for example, after all records have expired. So, I would
>need to track whether the storage record exists and is empty or
>whether it doesn't exist to know whether to call
>StorageService.create() or update(). I guess calling create() and then
>update() works, but that seems possibly noisy if the storage service
>is server-side.
I'd have to see the code, I don't really recall dealing with anything like
that before. With concurrency issues, it's basically assumed to be an
update because otherwise it couldn't have failed.
-- Scott
More information about the dev
mailing list