cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ehsan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-9246) Cassandra driver becomes unresponsive after two exceptions are raised and not caught inside the response callback
Date Mon, 27 Apr 2015 13:14:39 GMT

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

Ehsan updated CASSANDRA-9246:
-----------------------------
    Summary: Cassandra driver becomes unresponsive after two exceptions are raised and not
caught inside the response callback  (was: Cassandra driver becomes unresponsive after two
exceptions are raised)

> 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
>             Fix For: 2.0.1
>
>         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)

Mime
View raw message