public override void Check(NodeRecord record, CheckerEngine <NodeRecord, Org.Neo4j.Consistency.report.ConsistencyReport_NodeConsistencyReport> engine, RecordAccess records)
 {
     try
     {
         ICollection <PropertyRecord> properties = _propertyReader.getPropertyRecordChain(record.NextProp);
         _cacheAccess.client().putPropertiesToCache(properties);
         if (_indexes != null)
         {
             MatchIndexesToNode(record, engine, records, properties);
         }
         CheckProperty(record, engine, properties);
     }
     catch (PropertyReader.CircularPropertyRecordChainException e)
     {
         engine.Report().propertyChainContainsCircularReference(e.PropertyRecordClosingTheCircle());
     }
 }
Exemplo n.º 2
0
            protected internal override void ProcessCache()
            {
                RecordStore <NodeRecord> nodeStore = StoreAccess.NodeStore;
                CacheAccess_Client       client    = CacheAccess.client();
                long highId = nodeStore.HighId;

                for (long nodeId = 0; nodeId < highId; nodeId++)
                {
                    if (client.GetFromCache(nodeId, CacheSlots_NextRelationship_Fields.SLOT_FIRST_IN_TARGET) == 0)
                    {
                        NodeRecord node = nodeStore.GetRecord(nodeId, nodeStore.NewRecord(), FORCE);
                        if (node.InUse() && !node.Dense)
                        {
                            StoreProcessor.processNode(nodeStore, node);
                        }
                    }
                }
            }
Exemplo n.º 3
0
            protected internal override void ProcessCache()
            {
                CacheAccess.clearCache();
                long[]             fields = new long[] { -1, 1, 0 };
                CacheAccess_Client client = CacheAccess.client();

                using (ResourceIterator <NodeRecord> nodeRecords = Nodes.GetEnumerator())
                {
                    while (nodeRecords.MoveNext())
                    {
                        NodeRecord node = nodeRecords.Current;
                        if (node.InUse())
                        {
                            fields[CacheSlots_NextRelationship_Fields.SLOT_RELATIONSHIP_ID] = node.NextRel;
                            client.PutToCache(node.Id, fields);
                        }
                    }
                }
            }
Exemplo n.º 4
0
        public override void Process(NodeRecord nodeRecord)
        {
            _reporter.forNode(nodeRecord, _nodeIndexCheck);
            Org.Neo4j.Consistency.checking.cache.CacheAccess_Client client = _cacheAccess.client();
            using (MandatoryProperties.Check <NodeRecord, ConsistencyReport_NodeConsistencyReport> mandatoryCheck = _mandatoryProperties.apply(nodeRecord))
            {
                IEnumerable <PropertyRecord> properties = client.PropertiesFromCache;

                // We do this null-check here because even if nodeIndexCheck should provide the properties for us,
                // or an empty list at least, it may fail in one way or another and exception be caught by
                // broad exception handler in reporter. The caught exception will produce an ERROR so it will not
                // go by unnoticed.
                if (properties != null)
                {
                    foreach (PropertyRecord property in properties)
                    {
                        _reporter.forProperty(property, _propertyCheck);
                        mandatoryCheck.Receive(ChainCheck.keys(property));
                    }
                }
            }
        }