Skip to content

Commit 61a7660

Browse files
hanwengitster
authored andcommitted
reftable: document an alternate cleanup method on Windows
The new method uses the update_index counter, which isn't susceptible to clock inaccuracies. Signed-off-by: Han-Wen Nienhuys <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 00f6873 commit 61a7660

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Documentation/technical/reftable.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,8 +1011,13 @@ reftable stack, reload `tables.list`, and delete any tables no longer mentioned
10111011
in `tables.list`.
10121012

10131013
Irregular program exit may still leave about unused files. In this case, a
1014-
cleanup operation can read `tables.list`, note its modification timestamp, and
1015-
delete any unreferenced `*.ref` files that are older.
1014+
cleanup operation should proceed as follows:
1015+
1016+
* take a lock `tables.list.lock` to prevent concurrent modifications
1017+
* refresh the reftable stack, by reading `tables.list`
1018+
* for each `*.ref` file, remove it if
1019+
** it is not mentioned in `tables.list`, and
1020+
** its max update_index is not beyond the max update_index of the stack
10161021

10171022

10181023
Alternatives considered

0 commit comments

Comments
 (0)