JIRA Subversion Plugin Fork result in "svn: E204900: Referential integrity constraint violation:" errors

Mikkel Kragelund Nielsen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 14, 2013

I just "updated" from the version 1 subversion plugin "JIRA Subversion Plugin" to the new "JIRA Subversion Plugin Fork" version 2 plugin

All the repos i added with the old plugin are still there. But they are all inactive with the same error, beeing the reason:

Repository Root: svn://{removed on purpose}
Status: Inactive (svn: E204900: Referential integrity constraint violation: "COPY_FROM_REVISION_FK: CACHE.COPIES FOREIGN KEY(REPOID, FROM_REVISION) REFERENCES CACHE.REVISIONS(REPOID, REVISION) (8, 2652)"; SQL statement: insert into CACHE.COPIES (REVISION,ITEMID,FROM_REVISION, FROM_ITEMID, REPOID) VALUES(?,?,?,?,?) [23506-171])
Index:

The numbers (8,2652) & [23506-171] are different in all the repos, but otherwise its the same status.

Anyone have an idea, to why this happens?

2 answers

1 accepted

1 vote
Answer accepted
Kinto Soft
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 16, 2013

Hi,

It's a bug affecting to the H2 database which will be fixed soon.

Workaround:

1) Switch to the derby database

OR

2) Re-start the plug-in by disable + enable

Mikkel Kragelund Nielsen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2013

I have tried both workarounds. I have even tried to delete all repos and add them again. But with the same result.

Changing to derby DB resulted in this:


Status: Inactive (svn: E204900: INSERT on table 'COPIES' caused a violation of foreign key constraint 'COPY_FROM_REVISION_FK' for key (1,970). The statement has been rolled back.)

Kinto Soft
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2013

Awesome result. Prior I publish it, I cached the full public Apache's Subversion (https://svn.apache.org/repos/asf) with almost 1.5 millions of commits without any issue (among other public repositories).

The exception you reported means that the plug-in cannot index a svn copy command executed in the the revision N, becuase the revision N has not previously been indexed. As you tried both databases, it is probably a bug in my code or a very extrange Subversion issue (rare).

Might you try the latest SNAPSHOT version of the Atlassian's JIRA Subversion plug-in? It is an V2 plug-in so you have to install it from your JIRA Administration panel like other and no JIRA re-start is required. I've built it and you can download it from this link:

https://docs.google.com/file/d/0B4HWMpca7u1RdHBjWFJMLU5YSFU/edit?usp=sharing

Please, un-install mine to avoid conflicts and let me know wheter the Atlassians' SNAPSHOT plug-in works for you.

Mikkel Kragelund Nielsen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2013

That worked!

Now I'm getting the SVN commints. No inactive repos...
Guess the problem is database related.

Looks like you reverted back to a file index system, like the V1 plugin?

Kinto Soft
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2013

Looks like you reverted back to a file index system, like the V1 plugin?

No. It's not my plug.-in. It is the the JIRA Subversion plug-in from Atlassian. That is the reason becuase you see Lunce in action. It looks like they will support the V2 system since the coming 0.10.12.x version (which has not yet been released). I only downloaded their sources and built the SNAPSHOT plug-in from the public repository:

https://bitbucket.org/atlassian/jira-subversion-plugin

Derby is a quite robust database, and Regarding the exception you reported, it seems very interesting. Any chance for connect remotely to your repository in order to reproduce it from my environment? I wonder why the revison is missing in the transaction when the related branch is going to be indexed.

Or could you look, please, at the 1,970 revision from the Subversion repository and see whether it has any JIRA issue related (in the commit message). If so, is the related issue displaying the 1.970 revision ion the JIRA issue tab?

Thanks.

0 votes
Kinto Soft
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 8, 2013

It was fixed in the latest 1.4.2 version, relased a couple of weeks ago.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events