ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Gura <ag...@apache.org>
Subject Re: IgniteSemaphore and failoverSafe flag
Date Wed, 02 Nov 2016 11:36:48 GMT
Vladisav,

I've ran this test with partitioned cache and 1 backup and with replicated
cache (4 nodes in topology). Behavior is the same. I think it is bug. But
the first I wanted make sure that I understand failoverSafe flag correctly.

Thank you for reply. I'll create ticket.

On Tue, Nov 1, 2016 at 8:48 PM, Vladisav Jelisavcic <vladisavj@gmail.com>
wrote:

> 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 <agura@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.
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message