Beispiel #1
0
        private void RebuildCounts(long lastCommittedTransactionId, ProgressReporter progressReporter)
        {
            CleanupCountsForRebuilding();

            IdGeneratorFactory idGenFactory = new DefaultIdGeneratorFactory(_fs);
            StoreFactory       storeFactory = new StoreFactory(_testDir.databaseLayout(), _config, idGenFactory, _pageCache, _fs, _logProvider, EmptyVersionContextSupplier.EMPTY);

            using (Lifespan life = new Lifespan(), NeoStores neoStores = storeFactory.OpenAllNeoStores())
            {
                NodeStore         nodeStore           = neoStores.NodeStore;
                RelationshipStore relationshipStore   = neoStores.RelationshipStore;
                int            highLabelId            = ( int )neoStores.LabelTokenStore.HighId;
                int            highRelationshipTypeId = ( int )neoStores.RelationshipTypeTokenStore.HighId;
                CountsComputer countsComputer         = new CountsComputer(lastCommittedTransactionId, nodeStore, relationshipStore, highLabelId, highRelationshipTypeId, [email protected]_Fields.AutoWithoutPagecache, progressReporter);
                CountsTracker  countsTracker          = CreateCountsTracker();
                life.Add(countsTracker.setInitializer(countsComputer));
            }
        }