summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-10-16 14:10:03 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-10-16 14:10:20 -0400
commit95697161487c5df3d8a88cdccbc40fd0c4d7b094 (patch)
tree7fb5769ee098ddafb445e587f550a22c4f1f49c9 /doc
parentfb899e75cf1ac84f3fd61ea39288811bacddee2c (diff)
Avoid repeated checking that files passed on the command line exist.
git annex add, git annex lock etc make multiple seek passes, and each seek pass checked that files existed. That was unncessary redundant work. Fixed by adding a new WorkTreeItem type, make seek actions use it, and check that the files exist when constructing it. This commit was supported by the NSF-funded DataLad project.
Diffstat (limited to 'doc')
-rw-r--r--doc/bugs/add_-J_fails_with_not_found/comment_4_983aa78a20672e4d2b1b74a922eeba0a._comment22
-rw-r--r--doc/bugs/add_-J_fails_with_not_found/comment_5_c18b38456d58900f5710a311eced9f34._comment13
2 files changed, 35 insertions, 0 deletions
diff --git a/doc/bugs/add_-J_fails_with_not_found/comment_4_983aa78a20672e4d2b1b74a922eeba0a._comment b/doc/bugs/add_-J_fails_with_not_found/comment_4_983aa78a20672e4d2b1b74a922eeba0a._comment
new file mode 100644
index 000000000..f997b7193
--- /dev/null
+++ b/doc/bugs/add_-J_fails_with_not_found/comment_4_983aa78a20672e4d2b1b74a922eeba0a._comment
@@ -0,0 +1,22 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 4"""
+ date="2017-10-16T16:58:46Z"
+ content="""
+I was worried there could be further races in the seeking
+done by withFilesOldUnlocked and withFilesMaybeModified if those
+run while files are still being ingested by actions run earlier
+in the `git annex add`. Seems this is not a problem though --
+
+withFilesOldUnlocked looks for typeChanged files, but the files
+that were just/are currently being added were not in git before,
+so are not typeChanged.
+
+withFilesMaybeModified looks for modified files, and again these
+files were/are just being added for the first time, so it won't stumble
+over them.
+
+So, I don't think a synchronization point is needed. In fact,
+all three seeks could actually be run more concurrently than they are not
+without stepping on one-another's toes.
+"""]]
diff --git a/doc/bugs/add_-J_fails_with_not_found/comment_5_c18b38456d58900f5710a311eced9f34._comment b/doc/bugs/add_-J_fails_with_not_found/comment_5_c18b38456d58900f5710a311eced9f34._comment
new file mode 100644
index 000000000..352cc7a26
--- /dev/null
+++ b/doc/bugs/add_-J_fails_with_not_found/comment_5_c18b38456d58900f5710a311eced9f34._comment
@@ -0,0 +1,13 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 5"""
+ date="2017-10-16T17:06:43Z"
+ content="""
+That leaves only the innefficiency of checkFileOrDirectoryExists being
+run three times per parameter passed to `git annex add`.
+
+There are some other commands that also run checkFileOrDirectoryExists
+multiple times. `git annex lock` being one.
+
+So, I factored that out into a separate pass, that's only done once.
+"""]]