bugGNUstep - Bugs: bug #27823, SQLClient drops connections...

Group
 
 

bug #27823: SQLClient drops connections without sending notifications

Submitter:  Kai Henningsen <kaicats>
Submitted:  Tue 27 Oct 2009 12:04:04 PM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  In Test
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 27 Oct 2009 12:59:34 PM UTC, comment #1: 

I went through and checked that backends don't call the internal connect/disconnect methods when they should be calling the public versions (which are responsible for sending notifications).
This should be working in svn trunk now.

> Anyway, it seems rather unfriendly (and performance-hostile) to drop
> the connection just because there was an error.


I'm not sure I can agree with that ... if you are causing errors frequently enough for dropping the connection to be a big performance issue then there's probably something wrong with the way you are doing things.

Dropping the connection is a safety feature, to ensure that there is no chance of a connection being left in any sort of confused state by some unanticipated error ...  but I wouldn't mind a patch to allow a connection to attempt to recover gracefully as an option instead.

Richard Frith-Macdonald <CaS>
Group Member
Tue 27 Oct 2009 12:04:04 PM UTC, original submission:  

Scenario:

You have a connection to a PostgreSQL server.
The server issues an error.

Postgres.m will then close the connection and raise an exception, but will not send out a SQLClientDidDisconnectNotification. For that matter, I've never seen a SQLClientDidConnectNotification either. Presumably that never happens with automatic connects.

This is rather important when there's a need to start every connection with stuff like SET client_encoding = 'UTF8'.

Anyway, it seems rather unfriendly (and performance-hostile) to drop the connection just because there was an error. You cannot always avoid, say, causing a duplicate key error, in a situation where more than one connection is updating.

Kai Henningsen <kaicats>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by kaicats (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-10-27 CaS StatusNone Fixed
        Open/ClosedOpen In Test

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code