Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#14399 closed Uncategorized (invalid)

Site's get_current() not thread safe?

Reported by: Kronuz Owned by: nobody
Component: Uncategorized Version: 1.2
Severity: Normal Keywords:
Cc: Kronuz Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Is the Site caching system thread safe? I don't think it is. The patch in Ticket #7517 (as well as the code for get_current()) will get invalid or deleted sites when Site objects get deleted/updated in other thread other than the one using get_current(), since the objects wont get invalidated from such other threads to the one making the request.

I would believe shared memory is needed for that, to invalidate the object in all threads (it can be done using a "sync" time in a shared memory medium (memcache even))

Change History (2)

comment:1 Changed 6 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

No, it appears to me to be fine. If something you get out of the cache gets invalidated during the course of your request there's nothing sane we can do about this, *all* caching solutions will suffer from this problem.

comment:2 Changed 5 years ago by Kronuz

  • Cc Kronuz added
  • Easy pickings unset
  • Severity set to Normal
  • Type set to Uncategorized
  • UI/UX unset
Note: See TracTickets for help on using tickets.
Back to Top