Re: [RFC] fast-import: invalidate pack_id references after loosening

2016-05-27 Thread Eric Wong
Jeff King wrote: > On Thu, May 26, 2016 at 08:02:36AM +, Eric Wong wrote: > > > > That's probably OK in practice, as I think the actual pack-write already > > > does a linear walk of the object table to generate the pack index. So > > > presumably nobody checkpoints often enough for it to be

Re: [RFC] fast-import: invalidate pack_id references after loosening

2016-05-26 Thread Jeff King
On Thu, May 26, 2016 at 08:02:36AM +, Eric Wong wrote: > > That's probably OK in practice, as I think the actual pack-write already > > does a linear walk of the object table to generate the pack index. So > > presumably nobody checkpoints often enough for it to be a problem. And > > the solut

Re: [RFC] fast-import: invalidate pack_id references after loosening

2016-05-26 Thread Eric Wong
Jeff King wrote: > On Wed, May 25, 2016 at 10:54:02PM +, Eric Wong wrote: > > + for (h = 0; h < ARRAY_SIZE(object_table); h++) { > > + struct object_entry *e; > > + > > + for (e = object_table[h]; e; e = e->next) > > + if (e->pack_id == id) > > +

Re: [RFC] fast-import: invalidate pack_id references after loosening

2016-05-25 Thread Jeff King
On Wed, May 25, 2016 at 10:54:02PM +, Eric Wong wrote: > When loosening a pack, the current pack_id gets reused when > checkpointing and the import does not terminate. This causes > problems after checkpointing as the object table, branch, and > tag lists still contains pre-checkpoint referen

[RFC] fast-import: invalidate pack_id references after loosening

2016-05-25 Thread Eric Wong
When loosening a pack, the current pack_id gets reused when checkpointing and the import does not terminate. This causes problems after checkpointing as the object table, branch, and tag lists still contains pre-checkpoint references to the recycled pack_id. Merely clearing the object_table as su