Rev 4506: Some comment updates in http://bazaar.launchpad.net/~jameinel/bzr/1.17-chk-multilevel
John Arbash Meinel
john at arbash-meinel.com
Tue Jun 30 16:20:23 BST 2009
At http://bazaar.launchpad.net/~jameinel/bzr/1.17-chk-multilevel
------------------------------------------------------------
revno: 4506
revision-id: john at arbash-meinel.com-20090630151952-1ffvbwg6clhx7b20
parent: john at arbash-meinel.com-20090630144535-0wc7tiu3y8nfv32g
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.17-chk-multilevel
timestamp: Tue 2009-06-30 10:19:52 -0500
message:
Some comment updates
-------------- next part --------------
=== modified file 'bzrlib/chk_map.py'
--- a/bzrlib/chk_map.py 2009-06-30 14:45:35 +0000
+++ b/bzrlib/chk_map.py 2009-06-30 15:19:52 +0000
@@ -1430,7 +1430,8 @@
self._state = None
def _read_nodes_from_store(self, keys):
- # TODO: make use of _page_cache
+ # TODO: make use of _page_cache, or firmly decide not to because we
+ # want to use 'record' objects.
stream = self._store.get_record_stream(keys, 'unordered', True)
for record in stream:
if self._pb is not None:
@@ -1565,11 +1566,17 @@
def _process_next_uninteresting(self):
# TODO: We really should be filtering uninteresting requests a bit more
+ # Specifically, past the root level, we should be able to filter
+ # out uninteresting nodes that are not referenced by interesting
+ # items (we *do* currently filter out uninteresting nodes
+ # referenced from the root.)
prefix, ref = heapq.heappop(self._uninteresting_queue)
for record, node, prefix_refs, items in \
self._read_nodes_from_store([ref]):
self._all_uninteresting_items.update(items)
for prefix, ref in prefix_refs:
+ # TODO: Get a test written that exercises this, and then
+ # uncomment
# if ref in self._all_uninteresting_chks:
# continue
self._all_uninteresting_chks.add(ref)
=== modified file 'bzrlib/tests/test_chk_map.py'
--- a/bzrlib/tests/test_chk_map.py 2009-06-30 14:45:35 +0000
+++ b/bzrlib/tests/test_chk_map.py 2009-06-30 15:19:52 +0000
@@ -2314,10 +2314,12 @@
iterator = self.get_iterator([key1], [key2], chk_map._search_key_plain)
root_results = [record.key for record in iterator._read_all_roots()]
self.assertEqual([key1], root_results)
- # This is technically not the 'true minimal' set that we could use
- # The reason is that 'a' was matched exactly to 'ad' (by sha sum).
- # However, the code gets complicated in the case of more than one
- # interesting key, so for now, we live with this
+ # Note: This is technically not the 'true minimal' set that we could
+ # use The reason is that 'a' was matched exactly to 'ad' (by sha
+ # sum). However, the code gets complicated in the case of more
+ # than one interesting key, so for now, we live with this
+ # Consider revising, though benchmarking showing it to be a
+ # real-world issue should be done
self.assertEqual([('a', key2_a)], iterator._uninteresting_queue)
# self.assertEqual([], iterator._uninteresting_queue)
self.assertEqual([('aa', None, key1_aa)], iterator._interesting_queue)
More information about the bazaar-commits
mailing list