php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59333 apc_store/add/delete are not atomic?
Submitted: 2010-08-01 10:19 UTC Modified: 2013-02-18 00:35 UTC
From: martinrhill2000 at yahoo dot co dot uk Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: Trunk SVN-2010-08-01 (dev) OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-08-01 10:19 UTC] martinrhill2000 at yahoo dot co dot uk
Description:
------------
I'm not a PHP extension developer, nor am I familiar with 
APC's design, but from what I can tell by reading the source 
in the SVN, apc_store/add/delete are not atomic.

IMHO this destroys the main advantage of being able to pass 
multiple key/value pairs into apc_store/add/delete().

For example, my application caches data for a single large 
tree. Each node is stored as a separate cache item. Child 
nodes are referenced in parent nodes and vice versa. If the 
tree is modified (e.g. nodes added, removed, etc.) and the 
parent/child cache items are updated individually, the tree 
may be read in a broken state (nodes can either be read from 
child->parent or parent->child). If apc_store/add/delete 
worked in an atomic fashion, the tree would never be 
readable in a partially-updated (broken) state.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-08 14:08 UTC] gopalv82 at yahoo dot com
apc_store() is atomic.

Look for the CACHE_LOCK() lines in the apc_cache_insert()

If you think it isn't, I'd like to know where exactly?
 [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 04:01:28 2024 UTC