Committer: sbelyaev
LJSUP-12599: Counter error U trunk/cgi-bin/LJ/Entry/Repost.pm
Modified: trunk/cgi-bin/LJ/Entry/Repost.pm =================================================================== --- trunk/cgi-bin/LJ/Entry/Repost.pm 2012-06-19 11:41:34 UTC (rev 22282) +++ trunk/cgi-bin/LJ/Entry/Repost.pm 2012-06-19 13:00:03 UTC (rev 22283) @@ -83,8 +83,11 @@ __clear_reposters_list($journalid, $itemid); - LJ::MemCache::incr($memcache_key_count, 1) || - (LJ::MemCache::add($memcache_key_count, 0), LJ::MemCache::incr($memcache_key_count, 1)); + if (!LJ::MemCache::incr($memcache_key_count, 1)) { + my $count = __get_count($u, $itemid); + LJ::MemCache::add($memcache_key_count, int($count)); + } + LJ::MemCache::set($memcache_key_status, $repost_itemid, KEYS_EXPIRING); }