[ 
https://issues.apache.org/jira/browse/CASSANDRA-9246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14514166#comment-14514166
 ] 

Ehsan edited comment on CASSANDRA-9246 at 4/27/15 2:00 PM:
-----------------------------------------------------------

My bad! :(

The correct filed issue:

https://datastax-oss.atlassian.net/browse/NODEJS-109


was (Author: darrudi):
The correct filed issue:

https://datastax-oss.atlassian.net/browse/NODEJS-109

> Cassandra driver becomes unresponsive after two exceptions are raised and not 
> caught inside the response callback
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-9246
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9246
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: os: both win and linux
> framework: tested on both express and total.js frameworks
>            Reporter: Ehsan
>            Priority: Critical
>         Attachments: nodetest1.7z, result.png
>
>
> The driver becomes unresponsive when two two exception are raised and not 
> caught inside the Cassandra driver's response callback.
> how to reproduce:
> 1- setup a typical express (or total.js) project
> 2- add a simple route:
> {code:JavaScript}
> app.use('/test', test);
> {code}
> 3- code the route:
> {code:JavaScript}
> var cassandra = require('cassandra-driver');
> var contactPoints = ['cassandra-dev.nikoo.ir'];
> var driver = new cassandra.Client({
>   contactPoints: contactPoints,
>   keyspace: 'nikoomail',
>   queryOptions: {prepare: true},
>   socketOptions: {connectTimeout: 10000}
> });
> router.get('/', function(req, res, next) {
>   console.log();
>   console.log('-> Before executing the query');
>   driver.execute('SELECT * FROM domain', [], function(err, result) {
>     console.log('-> After executing the query');
>     res.send('respond with a resource');
>     throw new Error('Raising an exception here <--');
>   });
> });
> {code}
> 4- add a global exception handler:
> {code:JavaScript}
> process.on('uncaughtException', function(err) {
>   console.error(err);
> });
> {code}
> 5- run the project:
> npm start
> 6- navigate to http://localhost:300/test, notice the route works and the 
> "respond with a resource" is seen
> 7- redo step (6), 
> 8- for a third time repeat step (6) and notice the driver does not respond 
> anymore and consequently nothing is received on the client side.
> Note: a sample project has been attached reproducing the error.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to