PATCH/s: RM#1387 - Bad handling of missing connection database server

From: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: PATCH/s: RM#1387 - Bad handling of missing connection database server
Date: 2016-08-19 11:25:57
Message-ID: CAG7mmox_QEMVv7B0tE1ShLwgkEiPjfVmoo+iPrY10Vy7nGHZ-w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Dave/Team,

I have attached three patches targeting specific area of work.

-> *backend_connection_status_management*
* Takes care of the connection status in the psycopg2 driver. And, when the
connection is lost, it throws a exception with 503 http status message, and
connection lost information in it.
* Contains a change to allow to the flask application to propagate the
exceptions even in the release mode.
* Modification for utilising the existing password (while reconnection, if
not disconnected explicitly).
* Introduced a new ajax response message 'service_unavailable' (http status
code: 503), which suggests temporary service unavailable.

*-> manage_client_connect_lost*
* It handles the connection lost for different operations at client
(browser) side.
* Using the events to handle this situation.

*-> remove_connection_status_check*
* We're currently return precondition_required (HTTP status code: 428) for
the same, but - there is no consistent message/information available to
identify it reliably as the server connection lost error (client side
changes takes care of this situation, but - this patch is recommended for
the whole change to work properly). This patch removes the connection
status check from the individual nodes.

TODO:
* Browser tree - node expansion
- When there is an error occurred during expanding the aci-tree node, it
does not let the client handle the issue based on the status code, and
error message, as it does not expose/share the error details with us. We
will have to hack the aci-tree for the same.

* Query Editor
- Slick grid changes are in progress, hence - I did not touch the code for
it, as it will lead to rework for either one of us (me, or Murtuza). I will
take care of it as soon as the slick grid changes will be committed.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com>

*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi>

Attachment Content-Type Size
backend_connection_status_management_v1.patch application/octet-stream 12.8 KB
manage_client_connect_lost_v1.patch application/octet-stream 38.5 KB
nodes_connection_status_v1.patch application/octet-stream 75.8 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Surinder Kumar 2016-08-19 14:17:16 [pgAdmin4][Patch]: RM1570 - Cannot select template databases when creating a database
Previous Message Dave Page 2016-08-19 10:48:38 pgAdmin 4 commit: More string tweaks.