Re: [PATCH 1/2] refs/files-backend: handle packed transaction prepare failure

2019-03-22 Thread Taylor Blau
On Thu, Mar 21, 2019 at 08:06:01PM -0400, Jeff King wrote: > On Thu, Mar 21, 2019 at 05:28:44AM -0400, Jeff King wrote: > > > - instead of disconnecting backend_data->packed_transaction on error, > > we could wait to install it until we successfully prepare. That > > might make the flow a

Re: [PATCH 1/2] refs/files-backend: handle packed transaction prepare failure

2019-03-21 Thread Jeff King
On Thu, Mar 21, 2019 at 05:28:44AM -0400, Jeff King wrote: > - instead of disconnecting backend_data->packed_transaction on error, > we could wait to install it until we successfully prepare. That > might make the flow a little simpler, but it introduces a hassle. > Earlier parts of

[PATCH 1/2] refs/files-backend: handle packed transaction prepare failure

2019-03-21 Thread Jeff King
In files_transaction_prepare(), if we have to delete some refs, we use a subordinate packed_transaction to do so. It's rare for that sub-transaction's prepare step to fail, since we hold the packed-refs lock. But if it does, we trigger a BUG() due to these steps: - we've attached the packed tran