You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Taras Puchko (JIRA)" <ji...@apache.org> on 2011/05/06 16:23:03 UTC

[jira] [Created] (SSHD-131) ScpCommand should call SshFile.handleClose() when done with a file.

ScpCommand should call SshFile.handleClose() when done with a file.
-------------------------------------------------------------------

                 Key: SSHD-131
                 URL: https://issues.apache.org/jira/browse/SSHD-131
             Project: MINA SSHD
          Issue Type: Improvement
    Affects Versions: 0.5.0
            Reporter: Taras Puchko


SshFile.handleClose() is useless, since ScpCommand never calls it and an SshFile cannot detect if it's being used by SftpSubsystem or ScpCommand.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (SSHD-131) ScpCommand should call SshFile.handleClose() when done with a file.

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SSHD-131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039053#comment-13039053 ] 

Guillaume Nodet commented on SSHD-131:
--------------------------------------

Do you think you would have time to provide a patch to solve this problem ?

> ScpCommand should call SshFile.handleClose() when done with a file.
> -------------------------------------------------------------------
>
>                 Key: SSHD-131
>                 URL: https://issues.apache.org/jira/browse/SSHD-131
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 0.5.0
>            Reporter: Taras Puchko
>
> SshFile.handleClose() is useless, since ScpCommand never calls it and an SshFile cannot detect if it's being used by SftpSubsystem or ScpCommand.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (SSHD-131) ScpCommand should call SshFile.handleClose() when done with a file.

Posted by "Taras Puchko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SSHD-131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030893#comment-13030893 ] 

Taras Puchko commented on SSHD-131:
-----------------------------------

SshFile is a single abstraction for SftpSubsystem and ScpCommand. SftpSubsystem calls handleClose() but ScpCommand does not.

So I cannot rely on handleClose() at all since I cannot distinguish those two cases. If I do some cleanup in handleClose() there will be resource leaks when an SshFile is created by the ScpCommand.


> ScpCommand should call SshFile.handleClose() when done with a file.
> -------------------------------------------------------------------
>
>                 Key: SSHD-131
>                 URL: https://issues.apache.org/jira/browse/SSHD-131
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 0.5.0
>            Reporter: Taras Puchko
>
> SshFile.handleClose() is useless, since ScpCommand never calls it and an SshFile cannot detect if it's being used by SftpSubsystem or ScpCommand.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (SSHD-131) ScpCommand should call SshFile.handleClose() when done with a file.

Posted by "Taras Puchko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SSHD-131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044964#comment-13044964 ] 

Taras Puchko commented on SSHD-131:
-----------------------------------

Having looked into the code it seems to me that handleClose() should be left as is, but a more general solution requested in SSHD-108 would be more appropriate. Unfortunately I have no time at the moment to implement this feature.

> ScpCommand should call SshFile.handleClose() when done with a file.
> -------------------------------------------------------------------
>
>                 Key: SSHD-131
>                 URL: https://issues.apache.org/jira/browse/SSHD-131
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 0.5.0
>            Reporter: Taras Puchko
>
> SshFile.handleClose() is useless, since ScpCommand never calls it and an SshFile cannot detect if it's being used by SftpSubsystem or ScpCommand.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (SSHD-131) ScpCommand should call SshFile.handleClose() when done with a file.

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SSHD-131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet closed SSHD-131.
--------------------------------

    Resolution: Not A Problem
      Assignee: Guillaume Nodet

> ScpCommand should call SshFile.handleClose() when done with a file.
> -------------------------------------------------------------------
>
>                 Key: SSHD-131
>                 URL: https://issues.apache.org/jira/browse/SSHD-131
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 0.5.0
>            Reporter: Taras Puchko
>            Assignee: Guillaume Nodet
>
> SshFile.handleClose() is useless, since ScpCommand never calls it and an SshFile cannot detect if it's being used by SftpSubsystem or ScpCommand.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SSHD-131) ScpCommand should call SshFile.handleClose() when done with a file.

Posted by "Taras Puchko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SSHD-131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031100#comment-13031100 ] 

Taras Puchko commented on SSHD-131:
-----------------------------------

My issue is similar to SSHD-108. Creating an OutputStream for uploading is an expensive operation for us, so I don't close the actual stream on OutputStream.close() but do that on handleClose(). This works fine for SFTP, but does not work for SCP. If I could tell if this is SCP calling FileSystemView.getFile I would close SCP uploads on OutputStream.close() - but I have (almost) no way to detect that.

In short: I'd like every FileSystemView.getFile call to have a corresponding "cleanup" method call.

> ScpCommand should call SshFile.handleClose() when done with a file.
> -------------------------------------------------------------------
>
>                 Key: SSHD-131
>                 URL: https://issues.apache.org/jira/browse/SSHD-131
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 0.5.0
>            Reporter: Taras Puchko
>
> SshFile.handleClose() is useless, since ScpCommand never calls it and an SshFile cannot detect if it's being used by SftpSubsystem or ScpCommand.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (SSHD-131) ScpCommand should call SshFile.handleClose() when done with a file.

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SSHD-131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030520#comment-13030520 ] 

Guillaume Nodet commented on SSHD-131:
--------------------------------------

Not sure to understand the problem.  SshFile are mainly opened from SSH_FXP_OPEN and the corresponding handles are closed (hence calling SshFile#handleClose()) when the SSH_FXP_CLOSE is called for that handle.

> ScpCommand should call SshFile.handleClose() when done with a file.
> -------------------------------------------------------------------
>
>                 Key: SSHD-131
>                 URL: https://issues.apache.org/jira/browse/SSHD-131
>             Project: MINA SSHD
>          Issue Type: Improvement
>    Affects Versions: 0.5.0
>            Reporter: Taras Puchko
>
> SshFile.handleClose() is useless, since ScpCommand never calls it and an SshFile cannot detect if it's being used by SftpSubsystem or ScpCommand.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira