cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremiah Jordan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-6415) Snapshot repair block for ever is something happens to the "I made my snapshot" response
Date Wed, 27 Nov 2013 17:49:35 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-6415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jeremiah Jordan updated CASSANDRA-6415:
---------------------------------------

    Description: 
The "snapshotLatch.await();" can be waiting for ever and block all repair operations indefinitely
if something happens that another node doesn't respond.

{noformat}
            public void makeSnapshots(Collection<InetAddress> endpoints)
            {
                try
                {
                    snapshotLatch = new CountDownLatch(endpoints.size());
                    IAsyncCallback callback = new IAsyncCallback()
                    {
                        public boolean isLatencyForSnitch()
                        {
                            return false;
                        }

                        public void response(MessageIn msg)
                        {
                            RepairJob.this.snapshotLatch.countDown();
                        }
                    };
                    for (InetAddress endpoint : endpoints)
                        MessagingService.instance().sendRR(new SnapshotCommand(tablename,
cfname, sessionName, false).createMessage(), endpoint, callback);
                    snapshotLatch.await();
                    snapshotLatch = null;
                }
                catch (InterruptedException e)
                {
                    throw new RuntimeException(e);
                }
            }
{noformat}

  was:
The "snapshotLatch.await();" can be waiting for ever and block all repair operations indefinitely
if something happens that another node doesn't respond.

{quote}
            public void makeSnapshots(Collection<InetAddress> endpoints)
            {
                try
                {
                    snapshotLatch = new CountDownLatch(endpoints.size());
                    IAsyncCallback callback = new IAsyncCallback()
                    {
                        public boolean isLatencyForSnitch()
                        {
                            return false;
                        }

                        public void response(MessageIn msg)
                        {
                            RepairJob.this.snapshotLatch.countDown();
                        }
                    };
                    for (InetAddress endpoint : endpoints)
                        MessagingService.instance().sendRR(new SnapshotCommand(tablename,
cfname, sessionName, false).createMessage(), endpoint, callback);
                    snapshotLatch.await();
                    snapshotLatch = null;
                }
                catch (InterruptedException e)
                {
                    throw new RuntimeException(e);
                }
            }
{quote}


> Snapshot repair block for ever is something happens to the "I made my snapshot" response
> ----------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6415
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6415
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Jeremiah Jordan
>
> The "snapshotLatch.await();" can be waiting for ever and block all repair operations
indefinitely if something happens that another node doesn't respond.
> {noformat}
>             public void makeSnapshots(Collection<InetAddress> endpoints)
>             {
>                 try
>                 {
>                     snapshotLatch = new CountDownLatch(endpoints.size());
>                     IAsyncCallback callback = new IAsyncCallback()
>                     {
>                         public boolean isLatencyForSnitch()
>                         {
>                             return false;
>                         }
>                         public void response(MessageIn msg)
>                         {
>                             RepairJob.this.snapshotLatch.countDown();
>                         }
>                     };
>                     for (InetAddress endpoint : endpoints)
>                         MessagingService.instance().sendRR(new SnapshotCommand(tablename,
cfname, sessionName, false).createMessage(), endpoint, callback);
>                     snapshotLatch.await();
>                     snapshotLatch = null;
>                 }
>                 catch (InterruptedException e)
>                 {
>                     throw new RuntimeException(e);
>                 }
>             }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message