If you have a lot of calls to a service using drupal_http_request(), and that service goes down, then you'll end up with variable_set() running every time that request fails. Instead we should check the value of the current variable before trying to set it again.

Comments

catch’s picture

StatusFileSize
new994 bytes

s/variable_get/variable_set/ for the comment, via beejeebus in irc.

catch’s picture

D6 patch.

catch’s picture

StatusFileSize
new784 bytes

hmm, form submissions are playing up for me on d.o today.

damien tournoud’s picture

Well, if that's really a problem, why not doing that directly in variable_set()?

catch’s picture

Status: Needs review » Closed (duplicate)

It feels like there's the possibility for a race condition in variable_set(), this would also prevent setting variables that are specified in $conf. Either way I'm marking this as a duplicate of #965078: HTTP request checking is unreliable and should be removed in favor of watchdog() calls.