You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by yu...@apache.org on 2012/07/27 17:19:39 UTC

[49/50] [abbrv] git commit: CS.schedule throws UE instead of TOE patch by jbellis; reviewed by slebresne for CASSANDRA-4414

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/cassandra-1.1
Commit: 13f8eee99d0acb7063eab5dab7a8980d1b71a3b9
Parents: c9a13c3
Author: Jonathan Ellis <jb...@apache.org>
Authored: Wed Jul 11 23:29:37 2012 -0500
Committer: Jonathan Ellis <jb...@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();
+        }
     }
 
     /**