You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Valentin Kulichenko (JIRA)" <ji...@apache.org> on 2017/06/09 21:21:18 UTC

[jira] [Commented] (IGNITE-5183) parallelJobsNumber does not prevent concurrent execution

    [ https://issues.apache.org/jira/browse/IGNITE-5183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16045045#comment-16045045 ] 

Valentin Kulichenko commented on IGNITE-5183:
---------------------------------------------

{{FifoQueueCollisionSpi#onCollision}} has a race:
* Two concurrent threads enter the method and get the same number of active jobs.
* Both threads compare same number of active jobs with maximum allowed number of jobs.
* Both threads activate jobs.
* If initially number of active jobs was equal to maximum allowed number of jobs minus one, limit is exceeded.

However, I'm not sure if this should be fixed or just properly documented. Basically, the main purpose of this parameter is not to provide concurrency guarantees, but to make sure that too many jobs are not activated. As JavaDoc states, "this number should usually be set to the number of threads in the execution thread pool".

> parallelJobsNumber does not prevent concurrent execution
> --------------------------------------------------------
>
>                 Key: IGNITE-5183
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5183
>             Project: Ignite
>          Issue Type: Bug
>          Components: compute
>    Affects Versions: 1.5.0.final, 1.9, 2.0
>         Environment: Windows7, WIndows 8, Windows 10
>            Reporter: Ryan Ripken
>         Attachments: IgniteTest.7z
>
>
> Using FifoQueueCollisionSpi with parallelJobsNumber == 1 does not prevent multiple jobs from executing at the same time.
> Emails sent to Users list April 10th, 11th, 12th.
> Attached example which reproduces issue in Ignite 1.5.
> One node needs to run node.bat
> Another node should execute IgniteTest class.
> This example looks for concurrent execution using a static AtomicInteger, when multiple executions are detected it prints a message with lots of asterisks.
> The example also exhibits the issue in Ignite 1.9
> Example output:
>     Apr 11, 2017 5:02:48 PM org.apache.ignite.logger.java.JavaLogger warning
>     WARNING: Peer class loading is enabled (disable it in production for performance and deployment consistency reasons)
>     Apr 11, 2017 5:02:48 PM org.apache.ignite.logger.java.JavaLogger warning
>     WARNING: This operating system has been tested less rigorously: Windows 10 10.0 amd64. Our team will appreciate the feedback if you experience any problems running ignite in this environment.
>     Apr 11, 2017 5:02:48 PM org.apache.ignite.logger.java.JavaLogger warning
>     WARNING: Checkpoints are disabled (to enable configure any GridCheckpointSpi implementation)
>     Apr 11, 2017 5:02:48 PM org.apache.ignite.logger.java.JavaLogger warning
>     WARNING: Swap space is disabled. To enable use FileSwapSpaceSpi.
>     SLF4J: Class path contains multiple SLF4J bindings.
>     SLF4J: Found binding in [jar:file:/J:/ignite/modules/rest-http/target/libs/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>     SLF4J: Found binding in [jar:file:/J:/ignite/modules/visor-plugins/target/libs/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>     SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
>     SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
>     Apr 11, 2017 5:02:48 PM org.apache.ignite.logger.java.JavaLogger warning
>     WARNING: TcpDiscoveryMulticastIpFinder has no pre-configured addresses (it is recommended in production to specify at least one address in TcpDiscoveryMulticastIpFinder.getAddresses() configuration property)
>     Apr 11, 2017 5:03:43 PM ignitetest.TestJob execute
>     WARNING: *******Multiple jobs in progress. NOT GOOD ************************
>     *******Multiple jobs in progress. NOT GOOD ************************
>     Apr 11, 2017 5:03:43 PM ignitetest.TestJob execute
>     WARNING: *******Multiple jobs in progress. NOT GOOD ************************
>     *******Multiple jobs in progress. NOT GOOD ************************



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)