incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Innerhofer <>
Subject probable issues in JenaGraphAdaptor
Date Mon, 01 Nov 2010 12:41:05 GMT

When stress testing the platform we recurrently get the problem that it
looks like user information disappear from the system graph. After
restarting the TDB storage it's back to normal.
I started debugging this issue. The problem seems to be caused by a corrupt
mapping in JenaGraphAdaptor. It uses a BidiMapImpl instance to map Clerezza
BNode to jena nodes and vice versa. Internally the BidiMapImpl uses two
HashMaps, one for each direction. When the above problem occurs, then the
direction Clerezza BNode to jena Node is no longer correct, while the
direction jena Node to Clerezza BNode still is correct. As a consequence you
still can print out the PLATFORM:userName with the following code:

final Iterator<Triple> triples = systemGraph.filter(null, PLATFORM.userName,
Set<PlainLiteral> userNames = new HashSet<PlainLiteral>();
while (triples.hasNext()) {
   Triple triple =;
   System.out.println("User Name " + ((PlainLiteral)

But not with this:

Iterator<Triple> agents = systemGraph.filter(null, RDF.type, FOAF.Agent);
while (agents.hasNext()) {
    GraphNode agent = new GraphNode(,
    Iterator<Literal> userNames = agent.getLiterals(PLATFORM.userName);
    if (userNames.hasNext()) {

Anyway, I didn't find any bugs in the code that could cause this corrupt

But what I noticed is that every BNode used when filtering with
JenaGraphAptapter.performFilter() is added to this map. This regardless of
ifs existence in the graph. Therefore the map size grows steadily. For
example at the time the above problem occurred, the map size was over
120'000. This could maybe explain why the platform becomes slower with time.
Is it possible that the map could become corrupt because of its size? Maybe
some internal rehashing gone wrong?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message