Skip to content

Commit

Permalink
reftable: document an alternate cleanup method on Windows
Browse files Browse the repository at this point in the history
The new method uses the update_index counter, which isn't susceptible to clock
inaccuracies.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
  • Loading branch information
hanwen committed Apr 12, 2021
1 parent 89b43f8 commit 7048e02
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Documentation/technical/reftable.txt
Expand Up @@ -1011,8 +1011,13 @@ reftable stack, reload `tables.list`, and delete any tables no longer mentioned
in `tables.list`.

Irregular program exit may still leave about unused files. In this case, a
cleanup operation can read `tables.list`, note its modification timestamp, and
delete any unreferenced `*.ref` files that are older.
cleanup operation should proceed as follows:

* take a lock `tables.list.lock` to prevent concurrent modifications
* refresh the reftable stack, by reading `tables.list`
* for each `*.ref` file, remove it if
** it is not mentioned in `tables.list`, and
** its max update_index is not beyond the max update_index of the stack


Alternatives considered
Expand Down

0 comments on commit 7048e02

Please sign in to comment.