History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RHQ-515
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Greg Hinkle
Reporter: Greg Hinkle
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
RHQ Project

Metadata: Persistent List indexes update improperly

Created: 21/May/08 04:53 PM   Updated: 02/Oct/08 10:38 AM
Component/s: None
Affects Version/s: 1.0
Fix Version/s: 1.1

Time Tracking:
Not Specified

Issue Links:
Duplicate
 
Incorporate
 

Resolution Date: 16/Sep/08 01:31 AM
Date of First Response: 04/Jun/08 03:28 AM
VCS Revision: 1,473


 Description  « Hide
In some cases, updating certain metadata is causing one of the different persistent lists we have to get updated wrong so that the indexes in the database are wrong. I use the following SQL to find where any of our list index fields are screwed up.


select id, 'RHQ_CONFIG_PROP_GRP_DEF' from RHQ_CONFIG_PROP_GRP_DEF where ORDER_INDEX < 0
union all
select id, 'RHQ_CONFIG_PROP_DEF' from RHQ_CONFIG_PROP_DEF where ORDER_INDEX < 0
union all
select id, 'RHQ_CONF_PROP_DEF_ENUM' from RHQ_CONF_PROP_DEF_ENUM where ORDER_INDEX < 0
union all
select id, 'RHQ_CONFIG_PROP_CONSTR' from RHQ_CONFIG_PROP_CONSTR where ORDER_INDEX < 0
union all
select id, 'RHQ_CONFIG_PROPERTY' from RHQ_CONFIG_PROPERTY where LIST_INDEX < 0


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Heiko W. Rupp - 04/Jun/08 03:28 AM
Greg,
can you please tell, when / where that happens ?

 Heiko

Greg Hinkle - 29/Jul/08 08:03 PM
Heiko, I believe I was seeing this when updating the lists... a good example would be adding an enumerated option to a config property definition. But you'll want to check all modifications of ordered lists. (e.g. rearranging/adding/removing - existing properties, enum options, groups, etc.)

Joseph Marques - 15/Sep/08 07:50 AM
triaging upping this to blocker. if this is a result of one of the plugin updates we're doing for 1.0.1.GA -> 1.1.0.GA, then i think this probably needs to be fixed for 1.1.0.GA, right? if someone can verify that our updates for this release do not invoke this bug, then we can push this to 1.2 and push it's priority back down.

Greg Hinkle - 16/Sep/08 12:40 AM
Ok, I just tested this and did not get good results. I just added a new "<c:option" to the descriptor file in plugin config. (specifically, a new connection "type" option in the JMX plugin's JMXServer resource type.

I had 16 indexed properties... after I added the new one and redeployed the plugin, the last option is now in the database with an index of 32 while the originals are still in there indexed from 0 to 15. This really confuses hibernates indexed list loading so that it thinks there are 33 different values. It creates null values for the spaces and when that gets the renderer (specifically AbstractPropertyBagUIComponentTreeFactory.java:993) the UI rendering blows up.

This needs to get fixed before the release or we're going to have a big problem with certain plugin updates.

Greg Hinkle - 16/Sep/08 01:31 AM
Fixed the non-contiguous order_index problems that caused the UI not to render with certain metadata updates. The complete failure only seem to happen on the enumeration options. Had to fix the implementation of equals/hashcode on PropertyDefinitionEnumeration also.

Jeff Weiss - 22/Sep/08 09:54 AM
Sep 19 12:59:03 <jweiss_lunch> ghinkle: can you tell me how (or if) to test http://jira.rhq-project.org/browse/RHQ-515
Sep 19 13:03:44 --- jweiss_lunch is now known as jweiss
Sep 19 13:09:48 <ghinkle> jweiss, it's really only testable for certain plugin updates and it doesn't appear this type of update was made for any of our core servers
Sep 19 13:10:04 <ghinkle> i did test the heck out of this particular type of change so let's call it tested
Sep 19 13:10:15 <jweiss> ghinkle: ok by me