-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: # Context Watchman is a primary vector into the eden globFiles endpoint. How watchman interprets and sends arguments to eden different based on how the query is structured. This change is intended to make a common query pathway more efficient(referred to as SimpleSuffix from here). Query format example: ["query","<root>",{relative_root:"<rel_root>",fields:["content.sha1hex","name"],expression:["allof",["type","f"],["suffix",["<types>"]]]}] This is currently interpreted as [rel_root/**], then post-filtered in watchman. This change is intended to change this to use eden glob's searchRoot field and internal filtering. # This Diff Adds new functions to watchman QueryExprs: evaluateSimpleSuffix - intended to determine if the expression is a valid simple suffix getSuffixQueryGlobPatterns - basically only valid on SuffixExpr. Returns a list of suffixes in glob form. These are intended to allow watchman to determine if a given query is using a simple suffix so we can pass arguments to eden more efficiently. This is primarily targeted at allowing targeted SLAPI offloading, b ut may have benefits for queries that aren't offloaded since we're returning less files from eden. Rollout is controlled by the watchman config value eden_enable_simple_suffix # Technical Details evaluateSimpleSuffix - returns Excluded(Not part of a Simple Suffix), Type, Suffix, or Allof. An Allof result indicates that this is a valis SimpleSuffix. getSuffixQueryGlobPatterns - Takes the suffix expression (eg. ['a', 'b']) and converts it to glob form (**/*.a, **/*.b) Relative root is computed and passed down. Adjustments to filter is made to properly reflect this. Reviewed By: jdelliot Differential Revision: D65302345 fbshipit-source-id: 57c073022452b2ff8ea1c913d45cad2a3eee1484
- Loading branch information
1 parent
3a732d5
commit 501416a
Showing
13 changed files
with
356 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.