Opened 13 years ago
Last modified 3 months ago
#26402 new defect (bug)
Add option to DB if option is only present in cache when updating option
| Reported by: | codix | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Cache API | Version: | 3.8 |
| Severity: | normal | Keywords: | has-patch has-unit-tests early |
| Cc: | Focuses: |
Description
In very rare circumstances some options may not be in DB but in cache. On update if updating DB fails remove from cache and try to add option. This would eventually fix cache inconsistencies if they occur.
Both update_option and update_site_option are affected.
Attachments (2)
Change History (17)
#3
@
13 years ago
- Milestone 3.9 → Future Release
In very rare circumstances some options may not be in DB but in cache.
Knowing under what circumstances this would occur is really the only good way to fix this.
I understand the desire to wp_cache_delete() in these situations, but I am not sure about the desire to re-add. There is a concern that cache is stale, should just work to clear the cache and let it balance itself out later.
This is lacking unit tests to demonstrate the bug and/or fix, so I'm moving it to future release pending additional feedback.
This ticket was mentioned in PR #9481 on WordPress/wordpress-develop by @abcd95.
14 months ago
#6
- Keywords needs-refresh removed
This ticket was mentioned in Slack in #core by juanmaguitar. View the logs.
7 months ago
#10
@
7 months ago
From today's bug scrub
I'll keep it for now in 7.0 as if the PR is fine it could still be included in the 7.0 release. I'll ping a Core Comitter to have a look at the PR. I'll be happy to test it when the PR has been approved.
@SergeyBiryukov could you have a look at the PR. If the code is fine I can try to test it.
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
7 months ago
#12
@
7 months ago
- Milestone 7.0 → 7.1
As per today's 7.0 pre-RC1 bug scrub:
As the PR still needs testing, let's move the ticket to 7.1.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I agree that these persistent object cache/db inconsistencies are annoying as heck.