21541: Do cap_cache before we release the entries we just created
authorPeter Amstutz <peter.amstutz@curii.com>
Thu, 7 Mar 2024 00:42:11 +0000 (19:42 -0500)
committerPeter Amstutz <peter.amstutz@curii.com>
Thu, 7 Mar 2024 00:42:11 +0000 (19:42 -0500)
The goal is to avoid throwing out inodes that we just loaded.

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

services/fuse/arvados_fuse/command.py
services/fuse/arvados_fuse/fusedir.py

index c24e4f7764152363324c43a64782920e86697888..74d28a9e8a08228bf3229829370665dfa32f0d90 100644 (file)
@@ -18,6 +18,12 @@ import sys
 import time
 import resource
 
+# This is speculative, but we're having low frequency SSL crashes
+# early in the execution and so I thought maybe importing the SSL module
+# before we start any threads might be helpful.
+# On the other hand, I've still had it crash on me.
+import _ssl
+
 import arvados.commands._util as arv_cmd
 from arvados_fuse import crunchstat
 from arvados_fuse import *
index b202493e4aeb719c09ee83fc99e3cab1a84c7634..00b9d8b547dc4c03131fc98944528051496a75c6 100644 (file)
@@ -211,13 +211,13 @@ class Directory(FreshBase):
             self.inodes.invalidate_inode(self)
             self._mtime = time.time()
 
+        self.inodes.inode_cache.cap_cache()
+
         for ent in self._entries.values():
            ent.dec_use()
 
         self.fresh()
 
-        self.inodes.inode_cache.cap_cache()
-
     def in_use(self):
         if super(Directory, self).in_use():
             return True