Bug 821534

Summary: RFE: Consider increasing rhq_config_property.string_value to a 4000 character limit
Product: [Other] RHQ Project Reporter: Jay Shaughnessy <jshaughn>
Component: Configuration, DatabaseAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1148782    
Bug Blocks:    

Description Jay Shaughnessy 2012-05-14 20:09:25 UTC
At the moment we are using a varchar2( 2000 ) in Oracle and character varying (2000) in Postgres for rhq_config_property.string_value.

This is pretty reasonable but there may be times when our LongString config prop type may want to accommodate large values.  An example is perhaps the values for our new StartScriptEnv and StartScriptArg fields in the AS5 and AS7 plugins.

This should not affect space consumption as varying chars basically take up their length plus a small overhead for storing size.  There is not a lot of indication that this change would affect performance at all since config prop values are not indexed.

Oracle allows a 4000 max, so that would be the target size even though Postgres allows higher.

Still, given the critical nature of Configuration, and the already slow recursiveness of the sructure, a change probably warrants some perf analysis and upgrade checking.

Comment 1 Ian Springer 2012-05-14 20:12:15 UTC
Here's a couple links that support the claim that this change would not have any negative performance impact:

Oracle: http://arjudba.blogspot.com/2009/08/does-oversize-of-datatype-varchar2.html

Postgres: http://stackoverflow.com/questions/4848964/postgresql-difference-between-text-and-varchar-character-varying

Comment 2 Ian Springer 2012-05-15 14:29:01 UTC
If we bump up the max, we should also bump up the following column in RHQ_CONFIG_PROP_DEF:

<column name="DEFAULT_VALUE" type="VARCHAR2" required="false" size="2000"/>

We should also do a grep of the entire code base for the string "2000" in case there are any other references to the old max that need to be updated.

Comment 3 Ian Springer 2012-05-15 14:33:19 UTC
(10:29:44 AM) ips: i think we should also consider increasing propdef.description
(10:29:59 AM) ips: that's currently only 1000
(10:30:10 AM) jshaughn: yeah, there no reason to limit that
(10:30:23 AM) ips: well i guess all the description columns - operation, metric, etc.
(10:30:38 AM) jshaughn: sure, no real reason to limit description text
(10:30:57 AM) ips: nope