Skip to content

Commit 46b5f67

Browse files
pks-tgitster
authored andcommitted
refs/reftable: handle reloading stacks in the reftable backend
When accessing a stack we almost always have to reload the stack before reading data from it. This is mostly because Git does not have a notification mechanism for when underlying data has been changed, and thus we are forced to opportunistically reload the stack every single time to account for any changes that may have happened concurrently. Handle the reload internally in `backend_for()`. For one this forces callsites to think about whether or not they need to reload the stack. But second this makes the logic to access stacks more self-contained by letting the `struct reftable_backend` manage themselves. Update callsites where we don't reload the stack to document why we don't. In some cases it's unclear whether it is the right thing to do in the first place, but fixing that is outside of the scope of this patch series. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ad0986c commit 46b5f67

File tree

1 file changed

+126
-58
lines changed

1 file changed

+126
-58
lines changed

0 commit comments

Comments
 (0)