You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2008/04/14 14:35:05 UTC

[jira] Created: (JCR-1536) "Index already present" exception when opening a restored repository

"Index already present" exception when opening a restored repository
--------------------------------------------------------------------

                 Key: JCR-1536
                 URL: https://issues.apache.org/jira/browse/JCR-1536
             Project: Jackrabbit
          Issue Type: Bug
          Components: indexing
            Reporter: Thomas Mueller
            Priority: Minor


I have created a new repository, added one node, then copied all files while Jackrabbit is running.
Then closed the repository, restored the backup, and tried to open the repository.
Unfortunately, this resulted in the following exception:

javax.jcr.RepositoryException: Index already present: Index already present: Index already present
	at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:575)
	at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:255)
	at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1613)
	at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:606)

The backup contains the following index file:
workspaces/default/index/redo.log
There are no other files or directories or files in that directory (also no _n directories). The content of redo.log is:

-1 STR
-1 ADD cafebabe-cafe-babe-cafe-babecafebabe
-1 COM
0 STR
0 DEL cafebabe-cafe-babe-cafe-babecafebabe
0 ADD fa87759b-f9fe-4ba8-986c-d1914ffce3de
0 ADD eda04b36-9c21-4712-bedf-206c36f0e3d2
0 ADD ae917cca-a0bb-4ac0-a16d-805aac6c7b10
0 ADD cafebabe-cafe-babe-cafe-babecafebabe
0 COM
1 STR
1 ADD 0121f271-bbe7-4f71-a793-5f4380f3c487
1 COM


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JCR-1536) "Index already present" exception when opening a restored repository

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Reutegger resolved JCR-1536.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5

Fixed in revision: 647796

The method MultiIndex.numDocs() did not return the correct value after applying the redo.log.

> "Index already present" exception when opening a restored repository
> --------------------------------------------------------------------
>
>                 Key: JCR-1536
>                 URL: https://issues.apache.org/jira/browse/JCR-1536
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: indexing
>            Reporter: Thomas Mueller
>            Priority: Minor
>             Fix For: 1.5
>
>
> I have created a new repository, added one node, then copied all files while Jackrabbit is running.
> Then closed the repository, restored the backup, and tried to open the repository.
> Unfortunately, this resulted in the following exception:
> javax.jcr.RepositoryException: Index already present: Index already present: Index already present
> 	at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:575)
> 	at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:255)
> 	at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1613)
> 	at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:606)
> The backup contains the following index file:
> workspaces/default/index/redo.log
> There are no other files or directories or files in that directory (also no _n directories). The content of redo.log is:
> -1 STR
> -1 ADD cafebabe-cafe-babe-cafe-babecafebabe
> -1 COM
> 0 STR
> 0 DEL cafebabe-cafe-babe-cafe-babecafebabe
> 0 ADD fa87759b-f9fe-4ba8-986c-d1914ffce3de
> 0 ADD eda04b36-9c21-4712-bedf-206c36f0e3d2
> 0 ADD ae917cca-a0bb-4ac0-a16d-805aac6c7b10
> 0 ADD cafebabe-cafe-babe-cafe-babecafebabe
> 0 COM
> 1 STR
> 1 ADD 0121f271-bbe7-4f71-a793-5f4380f3c487
> 1 COM

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-1536) "Index already present" exception when opening a restored repository

Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588560#action_12588560 ] 

Thomas Mueller commented on JCR-1536:
-------------------------------------

Adding Thread.sleep(3200) between session.save() and copying the files 
solves the problem in most cases. Adding Thread.sleep(4000); always 
works on my machine (of course that's only a workaround, not a solution).


> "Index already present" exception when opening a restored repository
> --------------------------------------------------------------------
>
>                 Key: JCR-1536
>                 URL: https://issues.apache.org/jira/browse/JCR-1536
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: indexing
>            Reporter: Thomas Mueller
>            Priority: Minor
>
> I have created a new repository, added one node, then copied all files while Jackrabbit is running.
> Then closed the repository, restored the backup, and tried to open the repository.
> Unfortunately, this resulted in the following exception:
> javax.jcr.RepositoryException: Index already present: Index already present: Index already present
> 	at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:575)
> 	at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:255)
> 	at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1613)
> 	at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:606)
> The backup contains the following index file:
> workspaces/default/index/redo.log
> There are no other files or directories or files in that directory (also no _n directories). The content of redo.log is:
> -1 STR
> -1 ADD cafebabe-cafe-babe-cafe-babecafebabe
> -1 COM
> 0 STR
> 0 DEL cafebabe-cafe-babe-cafe-babecafebabe
> 0 ADD fa87759b-f9fe-4ba8-986c-d1914ffce3de
> 0 ADD eda04b36-9c21-4712-bedf-206c36f0e3d2
> 0 ADD ae917cca-a0bb-4ac0-a16d-805aac6c7b10
> 0 ADD cafebabe-cafe-babe-cafe-babecafebabe
> 0 COM
> 1 STR
> 1 ADD 0121f271-bbe7-4f71-a793-5f4380f3c487
> 1 COM

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-1536) "Index already present" exception when opening a restored repository

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-1536:
-------------------------------

      Component/s: jackrabbit-core
    Fix Version/s:     (was: 1.5)
                   core 1.4.3

Merged to the 1.4 branch in revision 650521.

> "Index already present" exception when opening a restored repository
> --------------------------------------------------------------------
>
>                 Key: JCR-1536
>                 URL: https://issues.apache.org/jira/browse/JCR-1536
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: indexing, jackrabbit-core
>            Reporter: Thomas Mueller
>            Priority: Minor
>             Fix For: core 1.4.3
>
>
> I have created a new repository, added one node, then copied all files while Jackrabbit is running.
> Then closed the repository, restored the backup, and tried to open the repository.
> Unfortunately, this resulted in the following exception:
> javax.jcr.RepositoryException: Index already present: Index already present: Index already present
> 	at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler(SearchManager.java:575)
> 	at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java:255)
> 	at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager(RepositoryImpl.java:1613)
> 	at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:606)
> The backup contains the following index file:
> workspaces/default/index/redo.log
> There are no other files or directories or files in that directory (also no _n directories). The content of redo.log is:
> -1 STR
> -1 ADD cafebabe-cafe-babe-cafe-babecafebabe
> -1 COM
> 0 STR
> 0 DEL cafebabe-cafe-babe-cafe-babecafebabe
> 0 ADD fa87759b-f9fe-4ba8-986c-d1914ffce3de
> 0 ADD eda04b36-9c21-4712-bedf-206c36f0e3d2
> 0 ADD ae917cca-a0bb-4ac0-a16d-805aac6c7b10
> 0 ADD cafebabe-cafe-babe-cafe-babecafebabe
> 0 COM
> 1 STR
> 1 ADD 0121f271-bbe7-4f71-a793-5f4380f3c487
> 1 COM

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.