From ae44a7a378de0d3326eeb5811dcad346f1251dc6 Mon Sep 17 00:00:00 2001 From: Byron Jones Date: Wed, 3 Sep 2014 23:34:03 +0800 Subject: Bug 1062344: contrib/reorg-tools/sync* do not clear memcached --- contrib/reorg-tools/move_dupes_to_invalid.pl | 2 ++ contrib/reorg-tools/move_os.pl | 3 ++- contrib/reorg-tools/movebugs.pl | 3 +++ contrib/reorg-tools/reassign_open_bugs.pl | 2 ++ contrib/reorg-tools/syncflags.pl | 4 +++- contrib/reorg-tools/syncmsandversions.pl | 5 +++-- 6 files changed, 15 insertions(+), 4 deletions(-) (limited to 'contrib') diff --git a/contrib/reorg-tools/move_dupes_to_invalid.pl b/contrib/reorg-tools/move_dupes_to_invalid.pl index bf3590ff3..25106ce9c 100755 --- a/contrib/reorg-tools/move_dupes_to_invalid.pl +++ b/contrib/reorg-tools/move_dupes_to_invalid.pl @@ -86,6 +86,8 @@ EOF $dbh->bz_commit_transaction(); } +# It's complex to determine which items now need to be flushed from memcached. +# As this is expected to be a rare event, we just flush the entire cache. Bugzilla->memcached->clear_all(); __END__ diff --git a/contrib/reorg-tools/move_os.pl b/contrib/reorg-tools/move_os.pl index 542e7ce0d..96b58d616 100755 --- a/contrib/reorg-tools/move_os.pl +++ b/contrib/reorg-tools/move_os.pl @@ -66,7 +66,8 @@ foreach my $bug_id (@$bug_ids) { } $dbh->bz_commit_transaction; - +# It's complex to determine which items now need to be flushed from memcached. +# As this is expected to be a rare event, we just flush the entire cache. Bugzilla->memcached->clear_all(); __END__ diff --git a/contrib/reorg-tools/movebugs.pl b/contrib/reorg-tools/movebugs.pl index b9acc2443..7ffca3615 100755 --- a/contrib/reorg-tools/movebugs.pl +++ b/contrib/reorg-tools/movebugs.pl @@ -177,3 +177,6 @@ foreach my $bug_id (@$ra_ids) { Bugzilla->memcached->clear({ table => 'bugs', id => $bug_id }); } +# It's complex to determine which items now need to be flushed from memcached. +# As this is expected to be a rare event, we just flush the entire cache. +Bugzilla->memcached->clear_all(); diff --git a/contrib/reorg-tools/reassign_open_bugs.pl b/contrib/reorg-tools/reassign_open_bugs.pl index b288e4789..6496f9a95 100755 --- a/contrib/reorg-tools/reassign_open_bugs.pl +++ b/contrib/reorg-tools/reassign_open_bugs.pl @@ -72,6 +72,8 @@ $from_user->clear_last_statistics_ts(); $to_user->clear_last_statistics_ts(); $dbh->bz_commit_transaction; +# It's complex to determine which items now need to be flushed from memcached. +# As this is expected to be a rare event, we just flush the entire cache. Bugzilla->memcached->clear_all(); __END__ diff --git a/contrib/reorg-tools/syncflags.pl b/contrib/reorg-tools/syncflags.pl index 6c5b8293a..8e039f7bb 100755 --- a/contrib/reorg-tools/syncflags.pl +++ b/contrib/reorg-tools/syncflags.pl @@ -83,4 +83,6 @@ $dbh->do("INSERT INTO flaginclusions(component_id, type_id, product_id) undef, $tgtprodid, $tgtprodid, $srcprodid); -exit(0); +# It's complex to determine which items now need to be flushed from memcached. +# As this is expected to be a rare event, we just flush the entire cache. +Bugzilla->memcached->clear_all(); diff --git a/contrib/reorg-tools/syncmsandversions.pl b/contrib/reorg-tools/syncmsandversions.pl index 1c3ce2154..20e88252e 100755 --- a/contrib/reorg-tools/syncmsandversions.pl +++ b/contrib/reorg-tools/syncmsandversions.pl @@ -117,5 +117,6 @@ $dbh->do(" $dbh->bz_commit_transaction(); -exit(0); - +# It's complex to determine which items now need to be flushed from memcached. +# As this is expected to be a rare event, we just flush the entire cache. +Bugzilla->memcached->clear_all(); -- cgit v1.2.3-24-g4f1b