mattcasters commented on code in PR #8973:
URL: https://github.com/apache/hop/pull/8973#discussion_r4300217507


##########
core/src/main/java/org/apache/hop/core/vfs/HopVfs.java:
##########
@@ -254,6 +254,10 @@ private static DefaultFileSystemManager 
managerOf(HopVfsNamespace namespace) {
               + namespace.getDescription()
               + " is closed. Resolving with the process wide file system 
manager instead.");
     }
+    // A thread that inherited the namespace keeps it for as long as it lives 
- the linter of Hop
+    // GUI
+    // does. Let go of it here, or every file it resolves from now on comes 
through this detour.
+    // X HopVfsNamespaces.unbindThreadIfCurrent(namespace);

Review Comment:
   **[bug]** `unbindThreadIfCurrent` is never called. The line that would drop 
a closed namespace from the thread that just fell back to the process-wide 
manager is commented out (`// X ...`). In single-tenant mode a thread that 
already inherited that namespace — the in-flight linter described in #8972 — 
keeps it for the rest of its life and logs "The VFS namespace of … is closed" 
on every later resolve. `aClosedNamespaceIsUnboundFromTheThread` and 
`anInheritedClosedNamespaceIsUnboundFromThatThreadOnly` assert the binding is 
cleared and will fail. The multi-tenant path is unaffected: `isIsolated()` 
returns before this line and rebuilds the namespace, which is what 
`aClosedNamespaceStaysBoundWhenTenantsShareTheJvm` expects.
   
   **Suggestion:** Uncomment 
`HopVfsNamespaces.unbindThreadIfCurrent(namespace);` and drop the `// X` 
marker. Leave the call after the `isIsolated()` rebuild so a shared JVM still 
keeps the binding.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to