Esempio n. 1
0
        public override IndexPopulationProgress GetIndexPopulationProgress(IndexDefinition index)
        {
            KernelTransaction transaction = SafeAcquireTransaction(_transactionSupplier);

            try
            {
                using (Statement ignore = transaction.AcquireStatement())
                {
                    SchemaRead         schemaRead = transaction.SchemaRead();
                    IndexReference     descriptor = GetIndexReference(schemaRead, transaction.TokenRead(), (IndexDefinitionImpl)index);
                    PopulationProgress progress   = schemaRead.IndexGetPopulationProgress(descriptor);
                    return(progress.ToIndexPopulationProgress());
                }
            }
            catch (Exception e) when(e is SchemaRuleNotFoundException || e is IndexNotFoundKernelException)
            {
                throw NewIndexNotFoundException(index, e);
            }
        }