[ARVADOS] updated: b459c9449b1a72a5df2ceeabe2e6477c5a81c2cd

git at public.curoverse.com git at public.curoverse.com
Tue Nov 24 17:25:18 EST 2015


Summary of changes:
 services/fuse/arvados_fuse/__init__.py | 4 ++--
 services/fuse/arvados_fuse/fresh.py    | 2 ++
 services/fuse/arvados_fuse/fusedir.py  | 3 +--
 services/fuse/arvados_fuse/fusefile.py | 1 +
 4 files changed, 6 insertions(+), 4 deletions(-)

  discards  446089420262a56c7a19524c9cc17457b3fc394e (commit)
  discards  c333c47a1334a36876017ab616a3646cbf1468cd (commit)
       via  b459c9449b1a72a5df2ceeabe2e6477c5a81c2cd (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (446089420262a56c7a19524c9cc17457b3fc394e)
            \
             N -- N -- N (b459c9449b1a72a5df2ceeabe2e6477c5a81c2cd)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit b459c9449b1a72a5df2ceeabe2e6477c5a81c2cd
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Nov 24 13:45:02 2015 -0500

    7751: Fix race by telling fuse not to cache the .arvados#collection dirent.

diff --git a/services/fuse/arvados_fuse/__init__.py b/services/fuse/arvados_fuse/__init__.py
index b7c0091..65f117b 100644
--- a/services/fuse/arvados_fuse/__init__.py
+++ b/services/fuse/arvados_fuse/__init__.py
@@ -407,8 +407,8 @@ class Operations(llfuse.Operations):
         entry = llfuse.EntryAttributes()
         entry.st_ino = inode
         entry.generation = 0
-        entry.entry_timeout = 60
-        entry.attr_timeout = 60
+        entry.entry_timeout = 60 if e.allow_dirent_cache else 0
+        entry.attr_timeout = 60 if e.allow_attr_cache else 0
 
         entry.st_mode = stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH
         if isinstance(e, Directory):
diff --git a/services/fuse/arvados_fuse/fresh.py b/services/fuse/arvados_fuse/fresh.py
index ec2d47a..2075741 100644
--- a/services/fuse/arvados_fuse/fresh.py
+++ b/services/fuse/arvados_fuse/fresh.py
@@ -67,6 +67,8 @@ class FreshBase(object):
         self.cache_priority = None
         self.cache_size = 0
         self.cache_uuid = None
+        self.allow_attr_cache = True
+        self.allow_dirent_cache = True
 
     # Mark the value as stale
     def invalidate(self):
diff --git a/services/fuse/arvados_fuse/fusefile.py b/services/fuse/arvados_fuse/fusefile.py
index 1eff08f..d1c8a77 100644
--- a/services/fuse/arvados_fuse/fusefile.py
+++ b/services/fuse/arvados_fuse/fusefile.py
@@ -110,6 +110,7 @@ class FuncToJSONFile(StringFile):
     """
     def __init__(self, parent_inode, func):
         super(FuncToJSONFile, self).__init__(parent_inode, "", 0)
+        self.allow_dirent_cache = False
         self.func = func
 
     def size(self):
diff --git a/services/fuse/tests/test_tmp_collection.py b/services/fuse/tests/test_tmp_collection.py
index e403a2c..60eba1b 100644
--- a/services/fuse/tests/test_tmp_collection.py
+++ b/services/fuse/tests/test_tmp_collection.py
@@ -110,12 +110,15 @@ class TmpCollectionTest(IntegrationTest):
              r'^\. 37b51d194a7513e45b56f6524f2d51f2\+3(\+\S+)? acbd18db4cc2f85cedef654fccc4a4d8\+3(\+\S+)? 0:3:bar 3:3:foo\n$'),
             ('foo', None,
              r'^\. 37b51d194a7513e45b56f6524f2d51f2\+3(\+\S+)? 0:3:bar\n$'),
+            ('bar', None,
+             r'^$'),
         ]
-        for fn, content, expect in ops:
-            path = os.path.join(tmpdir, fn)
-            if content is None:
-                os.unlink(path)
-            else:
-                with open(path, 'w') as f:
-                    f.write(content)
-            self.assertRegexpMatches(current_manifest(tmpdir), expect)
+        for _ in range(10):
+            for fn, content, expect in ops:
+                path = os.path.join(tmpdir, fn)
+                if content is None:
+                    os.unlink(path)
+                else:
+                    with open(path, 'w') as f:
+                        f.write(content)
+                self.assertRegexpMatches(current_manifest(tmpdir), expect)

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list