ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Gura <ag...@apache.org>
Subject IgniteSemaphore and failoverSafe flag
Date Tue, 01 Nov 2016 16:41:17 GMT
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