Viktor Dukhovni:
> > On Jul 26, 2016, at 5:12 PM, Peter <pe...@pajamian.dhs.org> wrote:
> > 
> > Would doing another cache read right before the update be an easy fix
> > for this?  I do realize this would add additional latency to postscreen,
> > hopefully not too much.
> 
> This still leaves a race condition in place, though it would be for a shorter
> time.

Yes, I would not want to double the number of database accesses.

It was easy enough to share one in-memory copy of postscreen cache
data among multiple SMTP sessions, by introducing one more level
of indirection.

Now it is a matter of carefully reading and updating that shared
state, and avoiding unnecessary postscreen cache lookups and updates
when SMTP sessions from the same client overlap in time.

        Wietse

Reply via email to