public inbox for [email protected]
help / color / mirror / Atom feedFrom: Surinder Kumar <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: Dave Page <[email protected]>
Cc: Ashesh Vashi <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: Re: RM#1387 [Add-on PATCH] Bad handling of missing connection database server
Date: Wed, 7 Sep 2016 17:08:07 +0530
Message-ID: <CAM5-9D-jn-Di9D3iAtsz8k8H2+_fNXU+aEj_GYOK+KuvmeiZJw@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDdF0ooA5qQo4ymjzcsSxjPEYL6nCziWOTtwC4jSnQxeWQ@mail.gmail.com>
References: <CAG7mmoz6hEi1BE=nSs2fGt_y5gpkpj6gDEp+WMAWJrJwepVHYw@mail.gmail.com>
<CAG7mmoxUL-H1poTGZz4KyMd9Tw3Po4yRDw_GK1Wu6w4YTK1WXA@mail.gmail.com>
<CA+OCxoz9cAT8x-YEKQ7MEOjqpR_0mrVbBt0QQ3_+aNdWhdPBPQ@mail.gmail.com>
<CANxoLDd517cU_yD_QpP1tPhePBRYQ5HoPR1y=HXc3HeDFbac4w@mail.gmail.com>
<CANxoLDdF0ooA5qQo4ymjzcsSxjPEYL6nCziWOTtwC4jSnQxeWQ@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
Hi
while closing query tool, the following error is display on python console.
File
"/Users/surinder/Documents/Projects/pgadmin4/web/pgadmin/tools/datagrid/__init__.py",
line 270, in close
manager.release(did=cmd_obj.did, conn_id=cmd_obj.conn_id)
File
"/Users/surinder/Documents/Projects/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
line 1501, in release
self.connections[my_id]._release()
File
"/Users/surinder/Documents/Projects/pgadmin4/web/pgadmin/utils/driver/psycopg2/__init__.py",
line 1002, in _release
if self.wasConneted:
AttributeError: 'Connection' object has no attribute 'wasConneted'
*Issue:*
This issue is due to typo. Please find attached patch.
On Tue, Sep 6, 2016 at 6:35 PM, Akshay Joshi <[email protected]>
wrote:
> Code looks good to me. Patch applied.
>
> On Tue, Sep 6, 2016 at 12:05 PM, Akshay Joshi <
> [email protected]> wrote:
>
>>
>>
>> On Fri, Sep 2, 2016 at 7:49 PM, Dave Page <[email protected]> wrote:
>>
>>> Akshay, can you review/commit this please?
>>>
>>
>> Sure.
>>
>>>
>>> Thanks.
>>>
>>> On Tue, Aug 30, 2016 at 5:05 PM, Ashesh Vashi <
>>> [email protected]> wrote:
>>>
>>>> On Tue, Aug 30, 2016 at 7:16 PM, Ashesh Vashi <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi Dave,
>>>>>
>>>>> Please find the add-on patch on top of the current change.
>>>>>
>>>>> Can you please take a look at it?
>>>>> This mainly works on the postgres driver to make an attempt to
>>>>> reconnect the server.
>>>>>
>>>>
>>>> One more attempt with some more corner cases handling.
>>>> * Handled the connection-lost, and object gone error on client side
>>>> during 'refresh' operation.
>>>> * Handle the reconnection more consistently (even during cursor object
>>>> creation).
>>>>
>>>> Please take a look at it.
>>>>
>>>> --
>>>>
>>>> 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;
>>>>
>>>>>
>>>>> --
>>>>>
>>>>> 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;
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>>
>> --
>> *Akshay Joshi*
>> *Principal Software Engineer *
>>
>>
>>
>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>
>
>
>
> --
> *Akshay Joshi*
> *Principal Software Engineer *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[application/octet-stream] fix_typo_in_pyscopg2_driver.patch (1.0K, 3-fix_typo_in_pyscopg2_driver.patch)
download | inline diff:
diff --git a/web/pgadmin/utils/driver/psycopg2/__init__.py b/web/pgadmin/utils/driver/psycopg2/__init__.py
index 9116aea..d4465ea 100644
--- a/web/pgadmin/utils/driver/psycopg2/__init__.py
+++ b/web/pgadmin/utils/driver/psycopg2/__init__.py
@@ -402,7 +402,7 @@ Connect to the database server (#{server_id}) for connection ({conn_id}), but -
if status is not None:
self.conn.close()
self.conn = None
- self.wasConneted = False
+ self.wasConnected = False
current_app.logger.error("""
Failed to fetch the version information on the established connection to the database server (#{server_id}) for '{conn_id}' with below error message:
{msg}
@@ -999,7 +999,7 @@ Failed to reset the connection to the server due to following error:
return self.execute_scalar('SELECT 1')
def _release(self):
- if self.wasConneted:
+ if self.wasConnected:
if self.conn:
self.conn.close()
self.conn = None
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Re: RM#1387 [Add-on PATCH] Bad handling of missing connection database server
In-Reply-To: <CAM5-9D-jn-Di9D3iAtsz8k8H2+_fNXU+aEj_GYOK+KuvmeiZJw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox