[DcpStream] Removing extra exception/abort that was added recently 62/57962/3
authorabhinavdangeti <abhinav@couchbase.com>
Mon, 21 Dec 2015 20:03:40 +0000 (12:03 -0800)
committerChiyoung Seo <chiyoung@couchbase.com>
Mon, 21 Dec 2015 22:37:06 +0000 (22:37 +0000)
Exceptions in 3.0.x are unhandled which makes them pretty
much the same as aborts/asserts.

Although it is impossible for the event where an active stream
enters STREAM_READING state to occur , it may be the better
thing to do - to have the risk of hitting this assertion be ZERO
for the maintainance releases only.

Change-Id: I0a1eff5ab6c8cec8ad6d97e9a1c2201844c25fbd
Reviewed-on: http://review.couchbase.org/57962
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Sriram Ganesan <sriram@couchbase.com>
Reviewed-by: Manu Dhundi <manu@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
src/dcp-stream.cc

index eb2e447..4e1ab9a 100644 (file)
@@ -840,8 +840,10 @@ void ActiveStream::transitionState(stream_state_t newState) {
         case STREAM_PENDING:
             break;
         case STREAM_READING:
-            throw std::logic_error("ActiveStream::transitionState:"
-                    " newState can't be STREAM_READING!");
+            LOG(EXTENSION_LOG_WARNING,
+                "ActiveStream::transitionState: newState can't be "
+                "STREAM_READING!");
+            break;
     }
 }