Howdy -- I just committed a big re-write of ReferenceManager that
fixed all of the broken unit tests, and integrated is with JCR. It's
not perfect, but it's a good start and it seems to work.

Except in one case that I can't explain. It seems to be Priha-related.

Some background on the new ReferenceManager:
- We store the references from pages to their destinations ("outbound
links" aka refersTo) as properties of the JCR node for the page.
(pages/${page}[wiki:refersTo]).
- We store the references to a page from their sources ("inbound
links" aka referredBy) in a separate JCR path,
wiki:references/wiki:wikiReferrers/${page}[wiki:referredBy], where
${page} is the page being referred to
- We store "uncreated" page names in a multi-valued property of node
wiki:references/wiki:notCreated[notCreated]
- We store "unreferenced" page names in a multi-valued property of
node wiki:references/wiki:notReferenced[notReferenced]

The uncreated/unreferenced features work nicely in the unit tests, but
I can reliably exhaust the heap through a sequence of events I don't
fully understand involving Scandic strings. Specifically, in batch
tests, just after JSPWikiMarkupParserTest.testScandicPagename1() runs
(which creates a page called "ÄitiSyöÖljyä"), the single property file
wiki:notReferenced/notReferenced.1.data (created by Phiha) grows
seemingly exponentially until it gets to about 75-100MB or so, at
which point the tests fall over. HexFiending the file shows that it
contains "Main:" follows by what appears to be unicode characters that
continue until the end of the file.

I haven't been able to identify the root cause, but it looks like an
encoding issue of some kind.

Janne, anything obvious here? (If there were, I probably would've
found it in the 3+ hours I spent debugging/pulling my hair out).

In the meantime, I think what I will do is change the way
uncreated/unreferenced pages are kept track of. Instead of using a
multi-valued property, nodes are probably more reliable.

Andrew

Reply via email to