Re: [Tracker] Procedure to change Tracker Ontologies in Running System
- From: Philip Van Hoof <spam pvanhoof be>
- To: "Compton, Matthew" <matthew compton windriver com>
- Cc: tracker-list gnome org
- Subject: Re: [Tracker] Procedure to change Tracker Ontologies in Running System
- Date: Fri, 13 Aug 2010 09:44:45 +0200
On Thu, 2010-08-12 at 14:56 -0700, Compton, Matthew wrote:
Hello,
I'm wondering if it is possible to change the Tracker ontology in
running system that already contains data. I think the only needed
changes are to add classes or properties to classes. Also, I'm hoping
to avoid having to re-index everything that is already stored in
Tracker.
From the page
http://live.gnome.org/Tracker/Documentation/SupportedOntologyChanges it
looks like it is possible to update the ontology on a running system,
but I don't see anywhere (in code documentation or the online
documentation) if there is a specific procedure for doing this.
OK, first a few VERY important things about changing the ontology:
o. We DON'T support it for packages, software and people who aren't
Tracker. This means that only the Tracker team can do a good official
ontology change. An application CAN NOT do it, IS NOT allowed to do
it, MUST NOT do it (or face serious incompatibility with upstream).
o. It's limited in capability, and its error reporting is vague, buggy
and even more limited in accurateness.
o. When done wrong, you'll loose data (possibly all your data) plus the
capability to make a backup and restore. Plus the capability to
replay your journal: the data is permanently gone then. Not possible
to recover it, unless you use a hexeditor over hundreds of megabytes.
OK, that's for the warning. Which boils down to: don't do this, etc etc.
From the code it looks you can:
1. Shutdown Tracker
2. Update the ontology files
3. Restart tracker and I think it will update the database to match
That #3 only happens for supported ontology changes, when done right.
I'm going to test this today but I thought I'd ask the experts if there
are any things to watch out for and if there is an official procedure
for doing this.
The official procedure is to change the nao:lastModified at the top of
every .ontology file, add the classes and properties (in order, a class
that is the domain of a property, must go above the property, etc), save
the file, restart tracker-store.
Creating a new file should work, but this has not been thoroughly
tested, and you need to add a correct namespace and prefix part at the
top of the file (copypaste and change from existing .ontology files).
Again, I can't stress this enough: this can only be useful to you for
either testing purposes or for private use (you maintain your own
ontology completely separate from upstream Tracker). Not for official
use. NO future version of Tracker will support YOUR ontology changes.
Only OUR OWN ontology changes will be supported (in forward direction,
not backwards compatibility). ANY change that YOU make WILL conflict
with our changes.
What you should do to make an ontology change, instead, is to make a
patch and send it to this mailing list for review.
Thanks for the help,
NP (but notice the warnings)
Cheers,
Philip
--
Philip Van Hoof
freelance software developer
Codeminded BVBA - http://codeminded.be
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]