Closed Bug 955962 Opened 12 years ago Closed 12 years ago

memcached touched unnecessarily when USE_MEMCACHED is false or no updates made

Categories

(Bugzilla :: Bugzilla-General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: glob, Assigned: glob)

References

Details

Attachments

(1 file, 1 obsolete file)

currently bugzilla::object::update() and remove_from_db() makes an unconditional call to remove an item from memcached. in both cases this call should be skipped if USE_MEMCACHED is false. additionally during an update() we can skip clearing the memcached entry if no changes were committed.
Attached patch 955962_1.patch (obsolete) — Splinter Review
Attachment #8355127 - Flags: review?(dkl)
Comment on attachment 8355127 [details] [diff] [review] 955962_1.patch >+ $dbh->do("DELETE FROM $table WHERE $id_field = ?", undef, $self->id) >+ if $self->USE_MEMCACHED; > $dbh->bz_commit_transaction(); > Bugzilla->memcached->clear({ table => $table, id => $self->id }); I suppose you meant to conditionally call Bugzilla->memcached->clear(), not $dbh->do("DELETE FROM $table ...").
Attachment #8355127 - Flags: review?(dkl) → review-
Target Milestone: --- → Bugzilla 5.0
Attached patch 955962_2.patchSplinter Review
d'oh
Attachment #8355127 - Attachment is obsolete: true
Attachment #8355209 - Flags: review?(dkl)
Comment on attachment 8355209 [details] [diff] [review] 955962_2.patch Review of attachment 8355209 [details] [diff] [review]: ----------------------------------------------------------------- r=dkl
Attachment #8355209 - Flags: review?(dkl) → review+
Flags: approval?
Flags: approval? → approval+
Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bugzilla/trunk/ modified Bugzilla/Object.pm Committed revision 8863.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: