You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by "STONE,ROBERT (HP-SanDiego,ex1)" <bo...@hp.com> on 2003/06/27 20:49:39 UTC
RE: [Bug 21055] - Indexes are not recognized after reboot
I like Kevin's runtime.xml idea, however it may impose problems when the
product is upgraded, database moved, runtime.xml modified by hand, lost,
etc. #1 isn't pretty but it guarantees that the index file will be re-read.
Or both solutions could be combined
Bob
-----Original Message-----
From: Kevin Ross
Sent: Friday, June 27, 2003 12:31 PM
To: xindice-dev@xml.apache.org
Subject: FW: [Bug 21055] - Indexes are not recognized after reboot
If anyone has feedback on Bob's potential solutions, please speak up.
I would say, let's not alter the system.xml, but add a runtime.xml in
the same directory, which maintains the runtime information for the
indexes (and anything else) for this instance. Much the same way the
Eclipse IDE uses the metadata directory. The runtime.xml would of
course need to be generated on first startup.
Thoughts?
Kevin Ross
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21055
------- Additional Comments From bob.stone@hp.com 2003-06-27 17:51
-------
1. While stepping through the code, I realized that there is no
mechanism for discovering existing index files. During startup,
IndexerManager searches for the "index" nodes in the configuration file
if none is found it happily ignores any index files that already exist
on the disk.
2. Now, moving to the creation of an index - list of the existing
indexes is
obtained from the Configuration object driven by system.xml. Because of
#1 -
list is empty and the IndexManager happily creates the index again and
stores it on disk. It also adds the child "index" node to the
configuration. However, this updated configuration is never persisted
back to the system.xml, and after reboot the index node is lost.
I'm not attempting to fix this because I don't know how this was
envisioned. I see two possibilities:
1. Add code that searches the file system for the index files and
updates the Configuration accordingly.
2. Overwrite the system.xml file on index add/remove
Please advice,
Bob Stone
RE: [Bug 21055] - Indexes are not recognized after reboot
Posted by Kevin Ross <Ke...@iVerticalLeap.com>.
Ok, sorry it took so long for me to reply. My thoughts:
Combination:
1. if runtime.xml doesn't exist, it is first startup, create
runtime.xml, search for indexes and add them
2. Every other time, utilize the runtime.xml only and do not search.
How does that sound?
-Kevin
-----Original Message-----
From: STONE,ROBERT (HP-SanDiego,ex1) [mailto:bob.stone@hp.com]
Sent: Friday, June 27, 2003 12:50 PM
To: 'xindice-dev@xml.apache.org'
Subject: RE: [Bug 21055] - Indexes are not recognized after reboot
I like Kevin's runtime.xml idea, however it may impose problems when the
product is upgraded, database moved, runtime.xml modified by hand, lost,
etc. #1 isn't pretty but it guarantees that the index file will be
re-read.
Or both solutions could be combined
Bob
-----Original Message-----
From: Kevin Ross
Sent: Friday, June 27, 2003 12:31 PM
To: xindice-dev@xml.apache.org
Subject: FW: [Bug 21055] - Indexes are not recognized after reboot
If anyone has feedback on Bob's potential solutions, please speak up.
I would say, let's not alter the system.xml, but add a runtime.xml in
the same directory, which maintains the runtime information for the
indexes (and anything else) for this instance. Much the same way the
Eclipse IDE uses the metadata directory. The runtime.xml would of
course need to be generated on first startup.
Thoughts?
Kevin Ross
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21055
------- Additional Comments From bob.stone@hp.com 2003-06-27 17:51
-------
1. While stepping through the code, I realized that there is no
mechanism for discovering existing index files. During startup,
IndexerManager searches for the "index" nodes in the configuration file
if none is found it happily ignores any index files that already exist
on the disk.
2. Now, moving to the creation of an index - list of the existing
indexes is
obtained from the Configuration object driven by system.xml. Because of
#1 -
list is empty and the IndexManager happily creates the index again and
stores it on disk. It also adds the child "index" node to the
configuration. However, this updated configuration is never persisted
back to the system.xml, and after reboot the index node is lost.
I'm not attempting to fix this because I don't know how this was
envisioned. I see two possibilities:
1. Add code that searches the file system for the index files and
updates the Configuration accordingly.
2. Overwrite the system.xml file on index add/remove
Please advice,
Bob Stone