hpss<->client should stream inventory deltas for xml to chk inventory situations

Bug #374738 reported by Robert Collins
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Critical
Andrew Bennetts

Bug Description

Fetching over the network should stream an inventory delta when going cross format, not send an entire xml inventory.

IDS currently gets in the way, as does our not having landed the inventory delta serialiser. (See also bug 385826.)

Changed in bzr:
importance: Undecided → High
status: New → Triaged
assignee: nobody → Andrew Bennetts (spiv)
Revision history for this message
Robert Collins (lifeless) wrote :

Bumping to critical, we really want this for 2.0. The delta serialiser has landed.

Changed in bzr:
importance: High → Critical
Changed in bzr:
milestone: none → 2.0
Martin Pool (mbp)
summary: - xml to chk inventory fetching
+ should stream an inventory delta for xml to chk inventory fetching
description: updated
tags: added: hpss
Revision history for this message
Andrew Bennetts (spiv) wrote : Re: should stream an inventory delta for xml to chk inventory fetching

So the plan for implementing inventory-deltas during fetch is:

 - define a new record storage_kind, "inventory-delta". get_bytes_as('fulltext') should fail for this record.
 - update _extract_and_insert_inventories in StreamSink to check each record to see if it is an inventory delta, if so:
   - look up the parent inventory in the target
   - apply the delta
   - add_inventory
   - (otherwise, use get_bytes_as('fulltext') as before)
 - update StreamSource to generate deltas rather than fulltexts when going from chk->non-chk, or vice-versa. (Or maybe just cross format in general?)
 - update the network protocol
   - serialise & deserialise inventory-delta records, e.g. update NetworkRecordStream. (bzrlib.inventory_delta already exists and will do most of the heavy lifting)
   - perhaps need new insert_stream and get_stream verbs to gracefully handle backwards compatibility.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 374738] Re: should stream an inventory delta for xml to chk inventory fetching

On Mon, 2009-06-29 at 01:28 +0000, Andrew Bennetts wrote:
>
> - look up the parent inventory in the target
> - apply the delta
> - add_inventory

This is one call: repository.add_inventory_by_delta

> - (otherwise, use get_bytes_as('fulltext') as before)
> - update StreamSource to generate deltas rather than fulltexts when
> going from chk->non-chk, or vice-versa. (Or maybe just cross format
> in general?)

Cross format in general IMO.

> - update the network protocol
> - serialise & deserialise inventory-delta records, e.g. update
> NetworkRecordStream. (bzrlib.inventory_delta already exists and will
> do most of the heavy lifting)
> - perhaps need new insert_stream and get_stream verbs to gracefully
> handle backwards compatibility.

Likely yes. We should try to do progress at the same time (by which I
mean before considering the verb stable in trunk). Or something.

-Rob

Revision history for this message
Martin Pool (mbp) wrote : Re: should stream an inventory delta for xml to chk inventory fetching

John asks: how does this fit in with InterDifferingSerializer? Is code in this place actually active?

Martin Pool (mbp)
Changed in bzr:
status: Triaged → In Progress
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 374738] Re: should stream an inventory delta for xml to chk inventory fetching

On Mon, 2009-06-29 at 23:11 +0000, Martin Pool wrote:
> John asks: how does this fit in with InterDifferingSerializer? Is code
> in this place actually active?

There is another critical bug open about disabling IDS for network push
and pull. Related to that was doing packs automatically on cross-format
fetch (which is done now).

-Rob

Andrew Bennetts (spiv)
Changed in bzr:
status: In Progress → Fix Committed
summary: - should stream an inventory delta for xml to chk inventory fetching
+ hpss<->client should stream inventory deltas for xml to chk inventory
+ situations
Revision history for this message
Andrew Bennetts (spiv) wrote :

Landed!

Changed in bzr:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.