From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QPmbV-0008LW-VN for garchives@archives.gentoo.org; Fri, 27 May 2011 02:16:46 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1ABA51C046; Fri, 27 May 2011 02:16:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E0FCB1C046 for ; Fri, 27 May 2011 02:16:38 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 58E6F1B400C for ; Fri, 27 May 2011 02:16:38 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 8A87880505 for ; Fri, 27 May 2011 02:16:37 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:2.1.9 commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/vartree.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: c71146ee4ae7c9c9c15a17de6bd8f3abf376d1d6 Date: Fri, 27 May 2011 02:16:37 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: e4324120d0885fcfbfca7199378e25ad commit: c71146ee4ae7c9c9c15a17de6bd8f3abf376d1d6 Author: Zac Medico gentoo org> AuthorDate: Fri May 27 02:14:20 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri May 27 02:16:06 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dc71146ee counter_tick_core: flush the cache (periodically) Since we hold a lock, this is a good opportunity to flush the cache. Note that this will only flush the cache periodically in the main process when _aux_cache_threshold is exceeded. --- pym/portage/dbapi/vartree.py | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 0ff2f7d..f93652b 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -798,6 +798,12 @@ class vardbapi(dbapi): self.settings._init_dirs() write_atomic(self._counter_path, str(counter)) self._cached_counter =3D counter + + # Since we hold a lock, this is a good opportunity + # to flush the cache. Note that this will only + # flush the cache periodically in the main process + # when _aux_cache_threshold is exceeded. + self.flush_cache() finally: self.unlock() =20