Bug 1388421 - Remove connection check before each query
Summary: Remove connection check before each query
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Database.DAL
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.1.0-alpha
: 4.1.0
Assignee: Oved Ourfali
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks: 1388462
TreeView+ depends on / blocked
 
Reported: 2016-10-25 10:19 UTC by Eli Mesika
Modified: 2017-02-01 14:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-01 14:57:18 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.1+
rule-engine: planning_ack+
mperina: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 65803 0 None None None 2016-10-27 12:16:35 UTC

Description Eli Mesika 2016-10-25 10:19:50 UTC
Description of problem:
Currently, each time a connection is requested from the connection pool, the connection is tested by selecting a "select 1;" query to the database.

This is redundant, since still the query can fail after it was checked.
In addition we should rely on the connection pool itself to give us a "good connection" 

This "select 1;" is harming database performance since every query executed is actually 2 queries resulting in 2 round-trips to the database to get the results.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.Track JDBC queries with JBuilder or any other tool that do the same
2.See that the top most executed query is "select 1;"
3.

Actual results:

"select 1;" is performed before any query to the database to test the connection.


Expected results:
We should rely on connection pooling and exception handling for getting a good connection and handling the exception in case that the connection fails to perform the query 

Additional info:

Comment 1 Red Hat Bugzilla Rules Engine 2016-10-25 10:21:22 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 2 Red Hat Bugzilla Rules Engine 2016-10-25 10:23:29 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 3 Sandro Bonazzola 2016-12-12 14:01:35 UTC
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.

Comment 4 Lucie Leistnerova 2017-01-17 12:45:27 UTC
'select 1' in 10s goes from 60 to 2 occurrences

verified in ovirt-engine-
4.1.0-0.4.master.20170116141310.gita30debd.el7.centos.noarch


Note You need to log in before you can comment on or make changes to this bug.