on 12-04-2014 7:02 PM
Recently when running an update to Hybris it gets stuck once it reaches Localizing Types. Every other section of the update appears to have run successfully and in theory I suppose the Localizing Types might eventually finish as it doesn't give any errors on screen or in the logs but I don't have much hope for it. Is there anything which could cause this issue and what could I do to fix it?
This is how your tables should look like:
show create table attributedescriptorslp \G
1. row
Table: attributedescriptorslp
Create Table: CREATE TABLE attributedescriptorslp
(
ITEMPK
bigint(20) NOT NULL DEFAULT '0',
ITEMTYPEPK
bigint(20) DEFAULT NULL,
LANGPK
bigint(20) NOT NULL DEFAULT '0',
p_name
varchar(255) COLLATE utf8_bin DEFAULT NULL,
p_description
text COLLATE utf8_bin,
PRIMARY KEY (`ITEMPK`,`LANGPK`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
mysql> show create table attributedescriptors \G
1. row *
Table: attributedescriptors
Create Table: CREATE TABLE attributedescriptors
(
hjmpTS
bigint(20) DEFAULT NULL,
createdTS
datetime DEFAULT NULL,
modifiedTS
datetime DEFAULT NULL,
..........
PRIMARY KEY (`PK`),
UNIQUE KEY qualifier_87
(`QualifierInternal`,`EnclosingTypePK`),
KEY enclosing_87
(`EnclosingTypePK`),
KEY inheritps_87
(`InheritancePathString`(255)),
KEY lcqualifier_87
(`QualifierLowerCaseInternal`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
In my case there was an issue for the rolling update (more specifically ant createtypesystem) which was fixed meanwhile. The attributedescriptors0 and the attributedescriptors0lp were missing the Primary key indexes. If you have the same issue, and you are trying to do a rolling update make sure you update to the latest patch level for your version, that should fix the issue. If you are not trying a rolling update you should not have the problem
For my workaround, during the system update, after the DDL piece was finished and before it got to localize types I had to manually run these indexes. I would not suggest doing this on a production system, this was just me playing around:
create unique index idx_itempk_langpk on attributedescriptors3lp (ITEMPK,langpk);
optimize table attributedescriptors3lp;
alter table attributedescriptors3 add unique index (pk);
optimize table attributedescriptors3lp;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We use hybris 5.2 & experience a verrrrry slow HAC->update . On doing the JDBC analysis , we found that , attributedescriptorslp is very slow. ![alt text][1]
Has any one faced this issue in oracle ?
Cristian : Can you tell me exactly when/how this needs to be done ?:
For my workaround, during the system update, after the DDL piece was finished and before it got to localize types I had to manually run these indexes
I would not suggest doing this on a production system, this was just me playing around: * - What is the ideal solution in production ?
I don't think you face the same issue as I experienced. My personal experience was with 5.4 rolling update and was due to a bug that was fixed since then, you should not have experienced this issue in 5.2 . Have you checked you have the correct indexes on the attributedescriptors and attributedescriptorslp, these should have been created when you first run init? Also I'd make sure that the index on (`ITEMPK`,`LANGPK`) on the attributedescriptorslp table is defined as the primary key and is marked as unique.
I don't know if it's a bug in 5.2, a quick search in jira did not reveal anything. There are other customers at this version running oracle and did not report this problem. Has a DBA looked at why this is slow or what is stalling. You can look at what queries are active across all sessions at one point in time in oracle, that should point you to where the problem is.
Have you tried to ajust the following property: types.localization.jdbc.number.of.threads ? I am not sure what it defaults to in 5.2 but in 5.6 it defaults to the # cores on the machine . If its multithreaded you may have an issue with oracle and not mysql, not sure maybe for some reason if it's set to a high value you run into issue, or maybe you need to adjust higher. I just ran across this today and thought this may help.
What version of hybris are you using? When doing a normal system update in 5.4 it works fine for me, however when trying to do a clone of type system and then perform a rolling update, as presented in rolling update documentation with a mysql database I have the same issues as you have. For me it was dues to the attributedescriptors0lp table missing its primary key index definitions. Check the table definition for attributedescriptorslp and attributedescriptors and make sure they have "primary key" indexes defined. If they do not have these you may want to add these indexes manually using SQL DDL statements. In my case adding them after aborting the system update and before kicking another system update did not do it, since the typesystem update would drop the index, so I had to add the indexes after the create typesystem part completed and before it gets into localization section.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.