Our bamboo instance has corruption like that described on the linked support page|https://confluence.atlassian.com/pages/viewpage.action?pageId=280694356 .
While testing the sql queries suggested there, I encountered some errors that indicate we are using different schema. It seems likely that the queries on that page were developed for a different version of Bamboo. We are running Bamboo 3.4.4.
I'll show below the queries we had trouble with and the errors that resulted. Note that these queries were modified to show the bad rows rather than delete them. (Please note also that, in contrast to the support page, our mysql database requires the table names be specified in UPPERCASE):
bq. select * from USER_COMMIT WHERE BUILDRESULTSUMMARY_ID NOT IN (SELECT BUILDRESULTSUMMARY_ID FROM BUILDRESULTSUMMARY);
bq. ERROR 1054 (42S22) at line 1: Unknown column 'BUILDRESULTSUMMARY_ID' in 'IN/ALL/ANY subquery'
bq. select * from COMMIT_FILES WHERE COMMIT_ID in (select COMMIT_ID from USER_COMMIT where BUILDRESULTSUMMARY_ID not IN (SELECT BUILDRESULTSUMMARY_ID FROM BUILDRESULTSUMMARY));
bq. ERROR 1054 (42S22) at line 1: Unknown column 'BUILDRESULTSUMMARY_ID' in 'IN/ALL/ANY subquery'
The problem is apparently that our USER_COMMIT table is different from what is shown on the figure on the support page:
{quote}
mysql> describe USER_COMMIT;
|| Field || Type || Null|| Key|| Default|| Extra||
| COMMIT_ID | bigint(20) | NO | PRI | 0 | |
| AUTHOR_ID | bigint(20) | YES | MUL | NULL | |
| COMMIT_DATE | datetime | YES | | NULL | |
| COMMIT_COMMENT_CLOB | longtext | YES | | NULL | |
| REPOSITORY_CHANGESET_ID | bigint(20) | YES | MUL | NULL | |
| COMMIT_REVISION | varchar(4000) | YES | MUL | NULL | |
6 rows in set (0.00 sec)
{quote}
As you can see, it doesn't have a BUILDRESULTSUMMARY_ID field.
Please advise what sql queries we should run to ensure everything is cleaned up as it should be. Should we just skip the deletions corresponding to these two queries, or are alternate queries needed?
Thank you,
Ed Segall
Ed,
I corrected this page. As I said, it's really hard to keep up with different Bamboo versions as the DB schema gets changed all the time. I am sorry for all the confusion related with Bamboo versions. One thing to pay attention is that RELEVANT_CHANGESETS and REPOSITORY_CHANGESET tables didn't exist in the 3.2 version, but they exist in the 3.4.x, and the corresponding SQL queries should be different. By the way, the same type of corruption might involve one table or a list of tables, and in that KB article not all possible tables are listed.
Thanks a lot for helping us to improve our stuff. Please let me know if you have any further questions or concerns.
Cheers,
Armen
Thank you for this update.
I knew I had seen your name recently, but I didn't remember that it was on the page we were discussing until just now. Sorry for the oversight.
Yes, I thought about trying to come up with the changes myself, and concluded that I might not have enough information and even if I did, it would probably be best to just ask for help.
I'm all set, thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ed,
I am sorry to see taht you are facing this problem. It is really hard to create very generic page to satisfy all Bamboo version databases. The Bamboo version on your mentioned article is for older than 3.4.4 instances. I would recommend the follwing options:
Cheers,
Armen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Armen,
Thank you for your response. I appreciate your suggestions (esp. DBVisualizer, which looks like a very useful tool). However:
- I did create a support ticket.
- As a result of that ticket, the original page was updated for Bamboo 3.4.4 on 12/6.
- As part of that conversation, I was told that the Bamboo version targeted on the original version of the page I referenced was newer, not older, than 3.4.4.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.