Hi,

when failoverSafe == true, semaphore should silently redistribute the
permits acquired on the failing node.
If failoverSafe is set to false, exception is thrown to every node
attempting to acquire.

It seems to me that when the first instance left topology,
no backups were available (this is similar to:
https://issues.apache.org/jira/browse/IGNITE-3386).
This should be fixed (semaphore should be recreated when create==true, as
suggested by Denis in the ticket).

It should be a minor fix, will be ready for 1.8.

Best regards,
Vladisav








On Tue, Nov 1, 2016 at 5:41 PM, Andrey Gura <ag...@apache.org> wrote:

> Hi all!
>
> Guys, could somebody explain semantic of failoverSafe flag in
> IgniteSemaphore. From my point of view the test below should work but it
> fails:
>
>     public void testFailoverReleasePermits() throws Exception {
>         Ignite ignite = grid(0);
>
>         IgniteSemaphore sem = ignite.semaphore("sem", 1, true, true);
>
>         sem.acquire(1);
>
>         ignite.close();
>
>         U.sleep(5000);
>
>         ignite = grid(1);
>
>         sem = ignite.semaphore("sem", 1, true, true);
>
>         boolean acquire = sem.tryAcquire(1, 5000, TimeUnit.MILLISECONDS);
>
>         assertTrue(acquire); // fails here
>     }
>
> From my point of view permit should be available after the first ignite
> instance left topology.
>

Reply via email to