You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by "Shinichiro Abe (JIRA)" <ji...@apache.org> on 2011/07/06 12:38:17 UTC

[jira] [Created] (CONNECTORS-217) Check running more than one of instance of agent

Check running more than one of instance of agent
------------------------------------------------

                 Key: CONNECTORS-217
                 URL: https://issues.apache.org/jira/browse/CONNECTORS-217
             Project: ManifoldCF
          Issue Type: Improvement
          Components: API
            Reporter: Shinichiro Abe
            Priority: Minor


Now, if one runs the o.a.manifold.agents.AgentRun command twice
on multi process, Java procceses run twice.
Even though the case of setting sync dir, the problem occurs.
In jetty the problem doesn't occur because of single process.

If one runs "executecommand.sh org.apache.manifold.agents.AgentRun" twice,
the command should warn that it is already running.

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

        

[jira] [Commented] (CONNECTORS-217) Check running more than one of instance of agent

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060518#comment-13060518 ] 

Karl Wright commented on CONNECTORS-217:
----------------------------------------

My only comment is that you should structure the code so that after the global flag is set, a try/finally block is used to clear the flag.  Otherwise an exception from within AgentRun will leave dangling locks.  For example:

<set flag>
try
{
...
}
finally
{
  <clear flag>
}


> Check running more than one of instance of agent
> ------------------------------------------------
>
>                 Key: CONNECTORS-217
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-217
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: API
>            Reporter: Shinichiro Abe
>            Priority: Minor
>         Attachments: CONNECTORS-217-exp.patch
>
>
> Now, if one runs the o.a.manifold.agents.AgentRun command twice
> on multi process, Java procceses run twice.
> Even though the case of setting sync dir, the problem occurs.
> In jetty the problem doesn't occur because of single process.
> If one runs "executecommand.sh org.apache.manifold.agents.AgentRun" twice,
> the command should warn that it is already running.

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

        

[jira] [Updated] (CONNECTORS-217) Check running more than one of instance of agent

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

Shinichiro Abe updated CONNECTORS-217:
--------------------------------------

    Attachment: CONNECTORS-217-1.patch

Thank you, I rewrote the code that add try-finally block. This patch works well. Please confirm it.

> Check running more than one of instance of agent
> ------------------------------------------------
>
>                 Key: CONNECTORS-217
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-217
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: API
>            Reporter: Shinichiro Abe
>            Priority: Minor
>         Attachments: CONNECTORS-217-1.patch, CONNECTORS-217-exp.patch
>
>
> Now, if one runs the o.a.manifold.agents.AgentRun command twice
> on multi process, Java procceses run twice.
> Even though the case of setting sync dir, the problem occurs.
> In jetty the problem doesn't occur because of single process.
> If one runs "executecommand.sh org.apache.manifold.agents.AgentRun" twice,
> the command should warn that it is already running.

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

        

[jira] [Resolved] (CONNECTORS-217) Check running more than one of instance of agent

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

Shinichiro Abe resolved CONNECTORS-217.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: ManifoldCF 0.3

> Check running more than one of instance of agent
> ------------------------------------------------
>
>                 Key: CONNECTORS-217
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-217
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: API
>            Reporter: Shinichiro Abe
>            Priority: Minor
>             Fix For: ManifoldCF 0.3
>
>         Attachments: CONNECTORS-217-1.patch, CONNECTORS-217-exp.patch
>
>
> Now, if one runs the o.a.manifold.agents.AgentRun command twice
> on multi process, Java procceses run twice.
> Even though the case of setting sync dir, the problem occurs.
> In jetty the problem doesn't occur because of single process.
> If one runs "executecommand.sh org.apache.manifold.agents.AgentRun" twice,
> the command should warn that it is already running.

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

        

[jira] [Commented] (CONNECTORS-217) Check running more than one of instance of agent

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060517#comment-13060517 ] 

Karl Wright commented on CONNECTORS-217:
----------------------------------------

Requiring AgentStop for a clean stop is actually required for multi-process deployments at this time.  The how-to-build-and-deploy page is quite clear about that.  So I think you are perfectly OK to insist upon it - indeed, I think it's an improvement because otherwise somebody might restart the agents process with broken locks, and your patch prevents that.


> Check running more than one of instance of agent
> ------------------------------------------------
>
>                 Key: CONNECTORS-217
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-217
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: API
>            Reporter: Shinichiro Abe
>            Priority: Minor
>         Attachments: CONNECTORS-217-exp.patch
>
>
> Now, if one runs the o.a.manifold.agents.AgentRun command twice
> on multi process, Java procceses run twice.
> Even though the case of setting sync dir, the problem occurs.
> In jetty the problem doesn't occur because of single process.
> If one runs "executecommand.sh org.apache.manifold.agents.AgentRun" twice,
> the command should warn that it is already running.

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

        

[jira] [Commented] (CONNECTORS-217) Check running more than one of instance of agent

Posted by "Karl Wright (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061166#comment-13061166 ] 

Karl Wright commented on CONNECTORS-217:
----------------------------------------

The patch looks fine.  Please beware of Apache conventions as far as indents are concerned - standard indent size is two spaces, no tabs.  Other than that please go ahead and commit.

> Check running more than one of instance of agent
> ------------------------------------------------
>
>                 Key: CONNECTORS-217
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-217
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: API
>            Reporter: Shinichiro Abe
>            Priority: Minor
>         Attachments: CONNECTORS-217-1.patch, CONNECTORS-217-exp.patch
>
>
> Now, if one runs the o.a.manifold.agents.AgentRun command twice
> on multi process, Java procceses run twice.
> Even though the case of setting sync dir, the problem occurs.
> In jetty the problem doesn't occur because of single process.
> If one runs "executecommand.sh org.apache.manifold.agents.AgentRun" twice,
> the command should warn that it is already running.

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

        

[jira] [Commented] (CONNECTORS-217) Check running more than one of instance of agent

Posted by "Shinichiro Abe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONNECTORS-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061806#comment-13061806 ] 

Shinichiro Abe commented on CONNECTORS-217:
-------------------------------------------

r1144179

Thank you, Indents of the code have been modified.

> Check running more than one of instance of agent
> ------------------------------------------------
>
>                 Key: CONNECTORS-217
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-217
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: API
>            Reporter: Shinichiro Abe
>            Priority: Minor
>         Attachments: CONNECTORS-217-1.patch, CONNECTORS-217-exp.patch
>
>
> Now, if one runs the o.a.manifold.agents.AgentRun command twice
> on multi process, Java procceses run twice.
> Even though the case of setting sync dir, the problem occurs.
> In jetty the problem doesn't occur because of single process.
> If one runs "executecommand.sh org.apache.manifold.agents.AgentRun" twice,
> the command should warn that it is already running.

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

        

[jira] [Updated] (CONNECTORS-217) Check running more than one of instance of agent

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

Shinichiro Abe updated CONNECTORS-217:
--------------------------------------

    Attachment: CONNECTORS-217-exp.patch

This is experimental. 
If this patch is applied, 
one must call "o.a.m.agents.AgentStop" command at the shutdown time. 
in other words, if one kills agent process by Control + C, 
it doesn't stop agents properly because lock objects are left.
so if so, one must call "o.a.m.core.LockClean" command.

> Check running more than one of instance of agent
> ------------------------------------------------
>
>                 Key: CONNECTORS-217
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-217
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: API
>            Reporter: Shinichiro Abe
>            Priority: Minor
>         Attachments: CONNECTORS-217-exp.patch
>
>
> Now, if one runs the o.a.manifold.agents.AgentRun command twice
> on multi process, Java procceses run twice.
> Even though the case of setting sync dir, the problem occurs.
> In jetty the problem doesn't occur because of single process.
> If one runs "executecommand.sh org.apache.manifold.agents.AgentRun" twice,
> the command should warn that it is already running.

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