cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/4] git commit: CS.schedule throws UE instead of TOE patch by jbellis; reviewed by slebresne for CASSANDRA-4414
Date Fri, 13 Jul 2012 16:32:47 GMT
Updated Branches:
  refs/heads/trunk 2f4c7c4dc -> 13f8eee99


CS.schedule throws UE instead of TOE
patch by jbellis; reviewed by slebresne for CASSANDRA-4414


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/13f8eee9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/13f8eee9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/13f8eee9

Branch: refs/heads/trunk
Commit: 13f8eee99d0acb7063eab5dab7a8980d1b71a3b9
Parents: c9a13c3
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed Jul 11 23:29:37 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Fri Jul 13 11:32:21 2012 -0500

----------------------------------------------------------------------
 .../apache/cassandra/thrift/CassandraServer.java   |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/13f8eee9/src/java/org/apache/cassandra/thrift/CassandraServer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/CassandraServer.java b/src/java/org/apache/cassandra/thrift/CassandraServer.java
index 15084c6..e594236 100644
--- a/src/java/org/apache/cassandra/thrift/CassandraServer.java
+++ b/src/java/org/apache/cassandra/thrift/CassandraServer.java
@@ -893,9 +893,16 @@ public class CassandraServer implements Cassandra.Iface
     /**
      * Schedule the current thread for access to the required services
      */
-    private void schedule(long timeoutMS) throws TimeoutException
+    private void schedule(long timeoutMS) throws UnavailableException
     {
-        requestScheduler.queue(Thread.currentThread(), state().getSchedulingValue(), timeoutMS);
+        try
+        {
+            requestScheduler.queue(Thread.currentThread(), state().getSchedulingValue(),
timeoutMS);
+        }
+        catch (TimeoutException e)
+        {
+            throw new UnavailableException();
+        }
     }
 
     /**


Mime
View raw message