Skip to content

Commit

Permalink
Skip usage check if record should be skipped to prevent not loaded re…
Browse files Browse the repository at this point in the history
…cords to be mistreated as not used.
  • Loading branch information
MishaDemianenko committed Nov 7, 2016
1 parent 6040124 commit b9cfdd2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -604,7 +604,7 @@ public void checkReference( RelationshipRecord record, RelationshipRecord referr
}
else
{
if ( !referred.inUse() )
if ( !referenceShouldBeSkipped( record, referred.getId(), records ) && !referred.inUse() )
{
engine.report().notUsedRelationshipReferencedInChain( referred );
}
Expand Down
Expand Up @@ -30,7 +30,7 @@ interface NodeLabel
int SLOT_LABEL_FIELD = 1;
}

interface NextRelationhip
interface NextRelationship
{
int SLOT_FIRST_IN_SOURCE = 0;
int SLOT_FIRST_IN_TARGET = 1;
Expand Down
Expand Up @@ -81,7 +81,7 @@ protected void processCache()
NodeRecord node = nodeRecords.next();
if ( node.inUse() )
{
fields[CacheSlots.NextRelationhip.SLOT_RELATIONSHIP_ID] = node.getNextRel();
fields[CacheSlots.NextRelationship.SLOT_RELATIONSHIP_ID] = node.getNextRel();
client.putToCache( node.getId(), fields );
}
}
Expand Down Expand Up @@ -109,7 +109,7 @@ protected void processCache()
CacheAccess.Client client = cacheAccess.client();
for ( long nodeId = 0; nodeId < nodeStore.getHighId(); nodeId++ )
{
if ( client.getFromCache( nodeId, CacheSlots.NextRelationhip.SLOT_FIRST_IN_TARGET ) == 0 )
if ( client.getFromCache( nodeId, CacheSlots.NextRelationship.SLOT_FIRST_IN_TARGET ) == 0 )
{
// TODO reuse record instances?
NodeRecord node = nodeStore.getRecord( nodeId, nodeStore.newRecord(), FORCE );
Expand Down

0 comments on commit b9cfdd2

Please sign in to comment.