I am a big proponent of the principles of this bug:
http://jira.xwiki.org/jira/browse/XWIKI-1021
I don't think the whole ID scheme currently used should be thrown out,
however, as it might break anyone with an existing XWiki installation
of any size (which I have).
I would like to see the following:
a) go ahead and use a hash of the name to find an initial ID
b) increment the number if necessary to ensure it's unique.
c) stay with that ID, period. Don't change it when something is renamed, etc.
I've been seeing some issues with renames where the name hash
collides, or all of the attachments associated with an ID aren't
updated correctly (so the attachments effectively "disappear"..)
There is no reason to keep the ID associated with a hash of the name,
as the initial lookup is almost always based on the document's name...
I think this is pretty important, especially with document renaming
now possible.
I was talking to Vincent about this, and I'll see if I can find a
patch. This also seems to line up with a Google Summer of Code item:
http://www.xwiki.org/xwiki/bin/view/GoogleSummerOfCode/Storage+Improvements
Erin
--
'Waste of a good apple' -Samwise Gamgee