git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/4] fsmonitor: start using an opaque token for last update
@ 2020-01-07 19:04 Kevin Willford via GitGitGadget
  2020-01-07 19:04 ` [PATCH 1/4] fsmonitor: change last update timestamp on the index_state to opaque token Kevin Willford via GitGitGadget
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Kevin Willford via GitGitGadget @ 2020-01-07 19:04 UTC (permalink / raw)
  To: git; +Cc: Kevin Willford, Junio C Hamano

When using watchman for the fsmonitor there are race conditions when using a
timestamp for the last update as noted in the watchman documentation "Using
a timestamp is prone to race conditions in understanding the complete state
of the file tree." https://facebook.github.io/watchman/docs/clockspec.html

Watchman uses something referred to as a clock id to remove these race
conditions. In order to use a clock id for the last update, an opaque value
needs to be returned by the fsmonitor hook and saved so that it can be
passed back to the fsmonitor hook for the next query. This requires a new
version for the fsmonitor index extension and new versions for the fsmonitor
watchman hooks. We also need to make sure version 1 of the hook continues to
work because users may not update their hook when they update git and we
want things to continue to work on repos still using a version 1 hook.

Kevin Willford (4):
  fsmonitor: change last update timestamp on the index_state to opaque
    token
  fsmonitor: handle version 2 of the hooks that will use opaque token
  fsmonitor: add fsmonitor hook scripts for version 2
  fsmonitor: update documentation for hook version and watchman hooks

 Documentation/config/core.txt              |  11 ++
 Documentation/githooks.txt                 |  13 +-
 cache.h                                    |   2 +-
 fsmonitor.c                                | 120 ++++++++++----
 t/helper/test-dump-fsmonitor.c             |   2 +-
 t/t7519-status-fsmonitor.sh                |   7 +-
 t/t7519/fsmonitor-all                      |   1 -
 t/t7519/fsmonitor-all-v2                   |  21 +++
 t/t7519/fsmonitor-watchman                 |   3 +-
 t/t7519/fsmonitor-watchman-v2              | 173 +++++++++++++++++++++
 templates/hooks--fsmonitor-watchman.sample | 138 ++++++++++------
 11 files changed, 405 insertions(+), 86 deletions(-)
 create mode 100755 t/t7519/fsmonitor-all-v2
 create mode 100755 t/t7519/fsmonitor-watchman-v2


base-commit: 0a76bd7381ec0dbb7c43776eb6d1ac906bca29e6
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-510%2Fkewillford%2Ffsmonitor_opaque_token-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-510/kewillford/fsmonitor_opaque_token-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/510
-- 
gitgitgadget

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-02-05 13:15 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-07 19:04 [PATCH 0/4] fsmonitor: start using an opaque token for last update Kevin Willford via GitGitGadget
2020-01-07 19:04 ` [PATCH 1/4] fsmonitor: change last update timestamp on the index_state to opaque token Kevin Willford via GitGitGadget
2020-01-07 19:04 ` [PATCH 2/4] fsmonitor: handle version 2 of the hooks that will use " Kevin Willford via GitGitGadget
2020-01-07 19:04 ` [PATCH 3/4] fsmonitor: add fsmonitor hook scripts for version 2 Kevin Willford via GitGitGadget
2020-01-07 19:04 ` [PATCH 4/4] fsmonitor: update documentation for hook version and watchman hooks Kevin Willford via GitGitGadget
2020-01-23 15:26 ` [PATCH v2 0/4] fsmonitor: start using an opaque token for last update Kevin Willford via GitGitGadget
2020-01-23 15:26   ` [PATCH v2 1/4] fsmonitor: change last update timestamp on the index_state to opaque token Kevin Willford via GitGitGadget
2020-02-05 12:49     ` Johannes Schindelin
2020-01-23 15:26   ` [PATCH v2 2/4] fsmonitor: handle version 2 of the hooks that will use " Kevin Willford via GitGitGadget
2020-02-05 13:11     ` Johannes Schindelin
2020-01-23 15:26   ` [PATCH v2 3/4] fsmonitor: add fsmonitor hook scripts for version 2 Kevin Willford via GitGitGadget
2020-01-23 15:26   ` [PATCH v2 4/4] fsmonitor: update documentation for hook version and watchman hooks Kevin Willford via GitGitGadget
2020-02-05 13:15   ` [PATCH v2 0/4] fsmonitor: start using an opaque token for last update Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).