Rev 2373: (John Arbash Meinel) Change WorkingTree to not read the inventory until we have a lock. in /home/pqm/archives/thelove/bzr/+trunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Mar 22 22:51:49 GMT 2007


------------------------------------------------------------
revno: 2373
revision-id: pqm at pqm.ubuntu.com-20070322225147-c274f2efe3564edc
parent: pqm at pqm.ubuntu.com-20070322213654-32f24e19910c30ef
parent: john at arbash-meinel.com-20070322195543-2eo6deu0aynnstaq
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2007-03-22 22:51:47 +0000
message:
  (John Arbash Meinel) Change WorkingTree to not read the inventory until we have a lock.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tree.py                 tree.py-20050309040759-9d5f2496be663e77
  bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
  bzrlib/workingtree_4.py        workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070322195543-2eo6deu0aynnstaq
    parent: john at arbash-meinel.com-20070322195430-wi92c7jpx17kiagr
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: make_locking_cheaper
    timestamp: Thu 2007-03-22 14:55:43 -0500
    message:
      NEWS for performance fix.
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070322195430-wi92c7jpx17kiagr
    parent: john at arbash-meinel.com-20070322151814-fs1m2j0inf8nu7w0
    parent: pqm at pqm.ubuntu.com-20070322152522-228285cac46c0dbc
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: make_locking_cheaper
    timestamp: Thu 2007-03-22 14:54:30 -0500
    message:
      [merge] bzr.dev 2371
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070322151814-fs1m2j0inf8nu7w0
    parent: john at arbash-meinel.com-20070321212157-3hmll50umf1nz1z3
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: make_locking_cheaper
    timestamp: Thu 2007-03-22 10:18:14 -0500
    message:
      WT2 needs to have an _inventory without a lock.
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070321212157-3hmll50umf1nz1z3
    parent: john at arbash-meinel.com-20070321181557-09nrfljkinlmyjmp
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: make_locking_cheaper
    timestamp: Wed 2007-03-21 16:21:57 -0500
    message:
      When upgrading, we can't assume that WorkingTree._inventory is valid, because that is now
      done during tree.lock_*
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070321181557-09nrfljkinlmyjmp
    parent: john at arbash-meinel.com-20070321175142-052tm470fx9s0obl
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: make_locking_cheaper
    timestamp: Wed 2007-03-21 13:15:57 -0500
    message:
      we don't need _inventory_fp.
      
      The bug is that calling self.read_working_inventory() acquires a read lock,
      which has a side effect of reading the working inventory,
      and then it reads the working inventory,
      and then because the overall tree is not locked (this is all happening in WorkingTree.__init__)
      all of this is being thrown away.
      So we end up with 2 inventory reads which will be completely thrown away.
    ------------------------------------------------------------
    merged: john at arbash-meinel.com-20070321175142-052tm470fx9s0obl
    parent: pqm at pqm.ubuntu.com-20070310232535-dd964b3ad4a93236
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: make_locking_cheaper
    timestamp: Wed 2007-03-21 12:51:42 -0500
    message:
      Lazily read working inventory in workingtree.py,
      this exposes code paths that are not locking the tree before
      processing, because they are directly accessing tree._inventory somehow
      (one case is Tree.path2id())



More information about the bazaar-commits mailing list