Skip to content

Implement transactions for the packed ref store

Michael Haggerty git 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest11 patches 3 repliesIn review
  2. v110 patches 20 repliesSuperseded

Changes in v2 from the cover letter

* Patch [01/11]: justify the change better in the log message. Add a comment explaining why get_packed_ref_cache() is being called but the return value discarded.

* Patch [05/11]: Lock the packed-refs file *after* successfully creating the (empty) transaction object. This prevents leaving the file locked if ref_store_transaction_begin() fails.

* Patch [06/11]: New patch, fixing a leak of the refs_to_prune linked list.

* Patch [07/11]: Reimplement test "no bogus intermediate values during delete" to work without polling. Also incorporate Junio's change s/grep/test_i18ngrep/.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11packed-backend: don't adjust the reference count on lock/unlockrefs/packed-backend.c+5 -50 replies
2/11struct ref_transaction: add a place for backends to store datarefs/refs-internal.h+1 -00 replies
3/11packed_ref_store: implement reference transactionsrefs/packed-backend.c refs/packed-backend.h+319 -30 replies
4/11packed_delete_refs(): implement methodrefs/files-backend.c refs/packed-backend.c+45 -20 replies
5/11files_pack_refs(): use a reference transaction to write packed refsrefs/files-backend.c+17 -70 replies
6/11prune_refs(): also free the linked listrefs/files-backend.c+10 -40 replies
7/11files_initial_transaction_commit(): use a transaction for packed refsrefs/files-backend.c+19 -100 replies
8/11t1404: demonstrate two problems with reference transactionst/t1404-update-ref-errors.sh+73 -02 replies
9/11files_ref_store: use a transaction to update packed refsrefs/files-backend.c t/t1404-update-ref-errors.sh+103 -330 replies
10/11packed-backend: rip out some now-unused coderefs/packed-backend.c refs/packed-backend.h+0 -2010 replies
11/11files_transaction_finish(): delete reflogs before referencesrefs/files-backend.c+21 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/11] Implement transactions for the packed ref store

This is v2 of a patch series to implement reference transactions for the packed refs-store. Thanks to Stefan, Brandon, Junio, and Peff for your review of v1 [1]. I believe I have addressed all of your comments.

Changes since v1:

* Patch [01/11]: justify the change better in the log message. Add a comment explaining why get_packed_ref_cache() is being called but the return value discarded.

* Patch [05/11]: Lock the packed-refs file *after* successfully creating the (empty) transaction object. This prevents leaving the file locked if ref_store_transaction_begin() fails.

* Patch [06/11]: New patch, fixing a leak of the refs_to_prune linked list.

* Patch [07/11]: Reimplement test "no bogus intermediate values during delete" to work without polling. Also incorporate Junio's change s/grep/test_i18ngrep/.

These changes are also available as branch packed-ref-transactions from my GitHub repo [2].

Michael

[1] https://public-inbox.org/git/[email protected]/
[2] https://github.com/mhagger/git

Michael Haggerty (11):
packed-backend: don't adjust the reference count on lock/unlock struct ref_transaction: add a place for backends to store data
packed_ref_store: implement reference transactions packed_delete_refs(): implement method
files_pack_refs(): use a reference transaction to write packed refs prune_refs(): also free the linked list files_initial_transaction_commit(): use a transaction for packed refs
t1404: demonstrate two problems with reference transactions
files_ref_store: use a transaction to update packed refs
packed-backend: rip out some now-unused code files_transaction_finish(): delete reflogs before references

 refs/files-backend.c         | 214 ++++++++++++++------
 refs/packed-backend.c        | 461 +++++++++++++++++++++++++++++--------------
 refs/packed-backend.h        |  17 +-
 refs/refs-internal.h         |   1 +
 t/t1404-update-ref-errors.sh |  73 +++++++
 5 files changed, 550 insertions(+), 216 deletions(-)
Signature · 1 line
2.14.1