incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Jaquith <>
Subject Re: Bizarre ReferenceManager issue
Date Mon, 04 May 2009 19:31:55 GMT
I've got a few changes to check in first; these fix some unrelated
issues. But the tests in question are still broken, so you'll see 'em
when you run them. With the checkin tonight, I'll provide some
guidance on where to put breakpoints so you can see the file bloat. :)

On Mon, May 4, 2009 at 2:09 PM, Janne Jalkanen <> wrote:
> Could very well be; the default FileProvider might have some issues in some
> corner cases. Can you leave the tests in a non-running state so that I can
> debug them?
> Multi-valued properties are the right way I think. (Nodes don't store any
> data as such.)
> /Janne
> On 4 May 2009, at 16:02, Andrew Jaquith wrote:
>> 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/ (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

View raw message