Uploaded image for project: 'DMC - Development'
  1. DMC - Development
  2. DMC-873

Explicit context destructor for gfal2 python bindings


    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: gfal2-python 1.9.0
    • Component/s: gfal2 python
    • Security Level: Public Data (This ticket is visible to anyone on the internet and will be indexed by search engines)
    • Labels:


      Hi Alejandro,

      we experienced an "issue" when using the gfal2 python bindings with the gsiftp:// protocol. However, this does not concern the gridftp-plugin but rather the python binding code itself.

      When a context is used to execute a command that involves gsiftp://, a ftp connection is opened and kept alive as long as the context (or more precisely, the C++-library-based context instance ("C-context")) exists. The Py-context has no explicit destructor _del_ that invokes the C-context destructor, so the actual destruction, and thus, the closing of open ftp connections only takes place when the Py-context instance is garbage-collected. Potentially, this means that you cannot close connections manually unless you keep track of all references to that Py-context instance which can be quite difficult in more complex use-cases.

      I would propose to add an explicit destructor in order to improve the control over open ftp connections.

      Thanks for considering this feature request.




            • Assignee:
              aalvarez Alejandro Alvarez Ayllon (Inactive)
              mrieger Marcel Rieger
              Component Watchers:
            • Votes:
              0 Vote for this issue
              4 Start watching this issue


              • Created: