Skip to content

Commit

Permalink
Cleanup around IndexDescriptor
Browse files Browse the repository at this point in the history
  • Loading branch information
ragadeeshu committed May 21, 2018
1 parent 31153a8 commit d5d06c1
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 82 deletions.
Expand Up @@ -29,7 +29,6 @@ import org.neo4j.internal.kernel.api.exceptions.KernelException
import org.neo4j.internal.kernel.api.{IndexReference, InternalIndexState} import org.neo4j.internal.kernel.api.{IndexReference, InternalIndexState}
import org.neo4j.kernel.api.schema.SchemaDescriptorFactory import org.neo4j.kernel.api.schema.SchemaDescriptorFactory
import org.neo4j.kernel.api.schema.constaints.ConstraintDescriptor import org.neo4j.kernel.api.schema.constaints.ConstraintDescriptor
import org.neo4j.kernel.api.schema.index.{IndexDescriptor => KernelIndexDescriptor}
import org.neo4j.kernel.impl.transaction.log.TransactionIdStore import org.neo4j.kernel.impl.transaction.log.TransactionIdStore


import scala.collection.JavaConverters._ import scala.collection.JavaConverters._
Expand Down
Expand Up @@ -24,7 +24,7 @@


import org.neo4j.internal.kernel.api.InternalIndexState; import org.neo4j.internal.kernel.api.InternalIndexState;
import org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException; import org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException;
import org.neo4j.kernel.api.schema.index.IndexDescriptor; import org.neo4j.kernel.api.schema.index.StoreIndexDescriptor;
import org.neo4j.kernel.impl.api.index.UpdateMode; import org.neo4j.kernel.impl.api.index.UpdateMode;
import org.neo4j.kernel.impl.api.index.updater.SwallowingIndexUpdater; import org.neo4j.kernel.impl.api.index.updater.SwallowingIndexUpdater;
import org.neo4j.storageengine.api.schema.IndexSample; import org.neo4j.storageengine.api.schema.IndexSample;
Expand Down Expand Up @@ -107,19 +107,19 @@ void add( Collection<? extends IndexEntryUpdate<?>> updates )
* Close this populator and releases any resources related to it. * Close this populator and releases any resources related to it.
* If {@code populationCompletedSuccessfully} is {@code true} then it must mark this index * If {@code populationCompletedSuccessfully} is {@code true} then it must mark this index
* as {@link InternalIndexState#ONLINE} so that future invocations of its parent * as {@link InternalIndexState#ONLINE} so that future invocations of its parent
* {@link IndexProvider#getInitialState(long, IndexDescriptor)} also returns {@link InternalIndexState#ONLINE}. * {@link IndexProvider#getInitialState(StoreIndexDescriptor)} also returns {@link InternalIndexState#ONLINE}.
* *
* @param populationCompletedSuccessfully {@code true} if the index population was successful, where the index should * @param populationCompletedSuccessfully {@code true} if the index population was successful, where the index should
* be marked as {@link InternalIndexState#ONLINE}, otherwise {@code false} where index should be marked as * be marked as {@link InternalIndexState#ONLINE}, otherwise {@code false} where index should be marked as
* {@link InternalIndexState#FAILED} and the failure, previously handed to this populator using {@link #markAsFailed(String)} * {@link InternalIndexState#FAILED} and the failure, previously handed to this populator using {@link #markAsFailed(String)}
* should be stored and made available for later requests from {@link IndexProvider#getPopulationFailure(long, IndexDescriptor)}. * should be stored and made available for later requests from {@link IndexProvider#getPopulationFailure(StoreIndexDescriptor)}.
* @throws IOException on I/O error. * @throws IOException on I/O error.
*/ */
void close( boolean populationCompletedSuccessfully ) throws IOException; void close( boolean populationCompletedSuccessfully ) throws IOException;


/** /**
* Called then a population failed. The failure string should be stored for future retrieval by * Called then a population failed. The failure string should be stored for future retrieval by
* {@link IndexProvider#getPopulationFailure(long, IndexDescriptor)}. Called before {@link #close(boolean)} * {@link IndexProvider#getPopulationFailure(StoreIndexDescriptor)}. Called before {@link #close(boolean)}
* if there was a failure during population. * if there was a failure during population.
* *
* @param failure the description of the failure. * @param failure the description of the failure.
Expand Down
Expand Up @@ -125,7 +125,7 @@ public interface Monitor


void indexPopulationScanComplete(); void indexPopulationScanComplete();


void awaitingPopulationOfRecoveredIndex( long indexId, IndexDescriptor descriptor ); void awaitingPopulationOfRecoveredIndex( StoreIndexDescriptor descriptor );
} }


public static class MonitorAdapter implements Monitor public static class MonitorAdapter implements Monitor
Expand All @@ -151,7 +151,7 @@ public void indexPopulationScanComplete()
} }


@Override @Override
public void awaitingPopulationOfRecoveredIndex( long indexId, IndexDescriptor descriptor ) public void awaitingPopulationOfRecoveredIndex( StoreIndexDescriptor descriptor )
{ // Do nothing { // Do nothing
} }
} }
Expand Down Expand Up @@ -326,7 +326,7 @@ public void start()
"What? This index was seen during recovery just now, why isn't it available now?", e ); "What? This index was seen during recovery just now, why isn't it available now?", e );
} }


monitor.awaitingPopulationOfRecoveredIndex( indexId, descriptor.getIndexDescriptor() ); monitor.awaitingPopulationOfRecoveredIndex( descriptor.getIndexDescriptor() );
awaitOnline( proxy ); awaitOnline( proxy );
} ); } );


Expand Down
Expand Up @@ -26,7 +26,7 @@


import org.neo4j.collection.PrimitiveLongCollections; import org.neo4j.collection.PrimitiveLongCollections;
import org.neo4j.internal.kernel.api.InternalIndexState; import org.neo4j.internal.kernel.api.InternalIndexState;
import org.neo4j.kernel.api.schema.index.IndexDescriptor; import org.neo4j.kernel.api.schema.index.StoreIndexDescriptor;
import org.neo4j.kernel.impl.api.index.IndexMap; import org.neo4j.kernel.impl.api.index.IndexMap;
import org.neo4j.kernel.impl.api.index.IndexMapSnapshotProvider; import org.neo4j.kernel.impl.api.index.IndexMapSnapshotProvider;
import org.neo4j.kernel.impl.api.index.IndexProxy; import org.neo4j.kernel.impl.api.index.IndexProxy;
Expand Down Expand Up @@ -92,7 +92,7 @@ public void recoverIndexSamples()
while ( indexIds.hasNext() ) while ( indexIds.hasNext() )
{ {
long indexId = indexIds.next(); long indexId = indexIds.next();
if ( indexRecoveryCondition.test( indexId, indexMap.getIndexProxy( indexId ).getDescriptor() ) ) if ( indexRecoveryCondition.test( indexMap.getIndexProxy( indexId ).getDescriptor() ) )
{ {
sampleIndexOnCurrentThread( indexMap, indexId ); sampleIndexOnCurrentThread( indexMap, indexId );
} }
Expand All @@ -106,7 +106,7 @@ public void recoverIndexSamples()


public interface RecoveryCondition public interface RecoveryCondition
{ {
boolean test( long indexId, IndexDescriptor descriptor ); boolean test( StoreIndexDescriptor descriptor );
} }


private void scheduleSampling( IndexSamplingMode mode, IndexMap indexMap ) private void scheduleSampling( IndexSamplingMode mode, IndexMap indexMap )
Expand Down
Expand Up @@ -22,7 +22,7 @@
import java.util.function.Predicate; import java.util.function.Predicate;


import org.neo4j.internal.kernel.api.TokenNameLookup; import org.neo4j.internal.kernel.api.TokenNameLookup;
import org.neo4j.kernel.api.schema.index.IndexDescriptor; import org.neo4j.kernel.api.schema.index.StoreIndexDescriptor;
import org.neo4j.kernel.impl.api.index.IndexMapSnapshotProvider; import org.neo4j.kernel.impl.api.index.IndexMapSnapshotProvider;
import org.neo4j.kernel.impl.api.index.IndexStoreView; import org.neo4j.kernel.impl.api.index.IndexStoreView;
import org.neo4j.scheduler.JobScheduler; import org.neo4j.scheduler.JobScheduler;
Expand Down Expand Up @@ -92,9 +92,9 @@ private IndexSamplingController.RecoveryCondition createIndexRecoveryCondition(
private final DoubleLongRegister register = newDoubleLongRegister(); private final DoubleLongRegister register = newDoubleLongRegister();


@Override @Override
public boolean test( long indexId, IndexDescriptor descriptor ) public boolean test( StoreIndexDescriptor descriptor )
{ {
boolean result = storeView.indexSample( indexId, register ).readSecond() == 0; boolean result = storeView.indexSample( descriptor.getId(), register ).readSecond() == 0;
if ( result ) if ( result )
{ {
log.debug( "Recovering index sampling for index %s", log.debug( "Recovering index sampling for index %s",
Expand Down
Expand Up @@ -62,14 +62,14 @@ public class DeferredConflictCheckingIndexUpdater implements IndexUpdater
{ {
private final IndexUpdater actual; private final IndexUpdater actual;
private final Supplier<IndexReader> readerSupplier; private final Supplier<IndexReader> readerSupplier;
private final IndexDescriptor schemaIndexDescriptor; private final IndexDescriptor indexDescriptor;
private final Set<ValueTuple> touchedTuples = new HashSet<>(); private final Set<ValueTuple> touchedTuples = new HashSet<>();


public DeferredConflictCheckingIndexUpdater( IndexUpdater actual, Supplier<IndexReader> readerSupplier, IndexDescriptor schemaIndexDescriptor ) public DeferredConflictCheckingIndexUpdater( IndexUpdater actual, Supplier<IndexReader> readerSupplier, IndexDescriptor indexDescriptor )
{ {
this.actual = actual; this.actual = actual;
this.readerSupplier = readerSupplier; this.readerSupplier = readerSupplier;
this.schemaIndexDescriptor = schemaIndexDescriptor; this.indexDescriptor = indexDescriptor;
} }


@Override @Override
Expand Down Expand Up @@ -113,7 +113,7 @@ public void close() throws IOException, IndexEntryConflictException
private IndexQuery[] queryOf( ValueTuple tuple ) private IndexQuery[] queryOf( ValueTuple tuple )
{ {
IndexQuery[] predicates = new IndexQuery[tuple.size()]; IndexQuery[] predicates = new IndexQuery[tuple.size()];
int[] propertyIds = schemaIndexDescriptor.schema().getPropertyIds(); int[] propertyIds = indexDescriptor.schema().getPropertyIds();
for ( int i = 0; i < predicates.length; i++ ) for ( int i = 0; i < predicates.length; i++ )
{ {
predicates[i] = exact( propertyIds[i], tuple.valueAt( i ) ); predicates[i] = exact( propertyIds[i], tuple.valueAt( i ) );
Expand Down
Expand Up @@ -242,11 +242,8 @@ long graphPropertiesReference()
@Override @Override
IndexReader indexReader( IndexReference index, boolean fresh ) throws IndexNotFoundKernelException IndexReader indexReader( IndexReference index, boolean fresh ) throws IndexNotFoundKernelException
{ {
IndexDescriptor schemaIndexDescriptor = index.isUnique() ? return fresh ? storageReader.getFreshIndexReader( (IndexDescriptor) index ) :
IndexDescriptorFactory.uniqueForLabel( index.label(), index.properties() ) : storageReader.getIndexReader( (IndexDescriptor) index );
IndexDescriptorFactory.forLabel( index.label(), index.properties() );
return fresh ? storageReader.getFreshIndexReader( schemaIndexDescriptor ) :
storageReader.getIndexReader( schemaIndexDescriptor );
} }


@Override @Override
Expand Down Expand Up @@ -559,14 +556,14 @@ Long indexGetOwningUniquenessConstraintId( IndexDescriptor index )
IndexDescriptor indexGetForSchema( SchemaDescriptor descriptor ) IndexDescriptor indexGetForSchema( SchemaDescriptor descriptor )
{ {
IndexDescriptor indexDescriptor = storageReader.indexGetForSchema( descriptor ); IndexDescriptor indexDescriptor = storageReader.indexGetForSchema( descriptor );
Iterator<IndexDescriptor> rules = iterator( indexDescriptor ); Iterator<IndexDescriptor> indexes = iterator( indexDescriptor );
if ( ktx.hasTxStateWithChanges() ) if ( ktx.hasTxStateWithChanges() )
{ {
rules = filter( indexes = filter(
SchemaDescriptor.equalTo( descriptor ), SchemaDescriptor.equalTo( descriptor ),
ktx.txState().indexDiffSetsByLabel( descriptor.keyId() ).apply( rules ) ); ktx.txState().indexDiffSetsByLabel( descriptor.keyId() ).apply( indexes ) );
} }
return singleOrNull( rules ); return singleOrNull( indexes );
} }


private boolean checkIndexState( IndexDescriptor index, ReadableDiffSets<IndexDescriptor> diffSet ) private boolean checkIndexState( IndexDescriptor index, ReadableDiffSets<IndexDescriptor> diffSet )
Expand Down
Expand Up @@ -297,11 +297,11 @@ public Iterator<CapableIndexDescriptor> indexesGetRelatedToProperty( int propert
@Override @Override
public Long indexGetOwningUniquenessConstraintId( IndexDescriptor index ) public Long indexGetOwningUniquenessConstraintId( IndexDescriptor index )
{ {
StoreIndexDescriptor rule = indexRule( index ); StoreIndexDescriptor storeIndexDescriptor = getStoreIndexDescriptor( index );
if ( rule != null ) if ( storeIndexDescriptor != null )
{ {
// Think of the index as being orphaned if the owning constraint is missing or broken. // Think of the index as being orphaned if the owning constraint is missing or broken.
Long owningConstraint = rule.getOwningConstraint(); Long owningConstraint = storeIndexDescriptor.getOwningConstraint();
return schemaCache.hasConstraintRule( owningConstraint ) ? owningConstraint : null; return schemaCache.hasConstraintRule( owningConstraint ) ? owningConstraint : null;
} }
return null; return null;
Expand All @@ -311,12 +311,12 @@ public Long indexGetOwningUniquenessConstraintId( IndexDescriptor index )
public long indexGetCommittedId( IndexDescriptor index ) public long indexGetCommittedId( IndexDescriptor index )
throws SchemaRuleNotFoundException throws SchemaRuleNotFoundException
{ {
StoreIndexDescriptor rule = indexRule( index ); StoreIndexDescriptor storeIndexDescriptor = getStoreIndexDescriptor( index );
if ( rule == null ) if ( storeIndexDescriptor == null )
{ {
throw new SchemaRuleNotFoundException( SchemaRule.Kind.INDEX_RULE, index.schema() ); throw new SchemaRuleNotFoundException( SchemaRule.Kind.INDEX_RULE, index.schema() );
} }
return rule.getId(); return storeIndexDescriptor.getId();
} }


@Override @Override
Expand Down Expand Up @@ -671,13 +671,13 @@ public void degrees( NodeItem nodeItem, DegreeVisitor visitor )
} }
} }


private StoreIndexDescriptor indexRule( IndexDescriptor index ) private StoreIndexDescriptor getStoreIndexDescriptor( IndexDescriptor index )
{ {
for ( StoreIndexDescriptor rule : schemaCache.indexRules() ) for ( StoreIndexDescriptor descriptor : schemaCache.indexRules() )
{ {
if ( rule.equals( index ) ) if ( descriptor.equals( index ) )
{ {
return rule; return descriptor;
} }
} }


Expand Down
Expand Up @@ -56,17 +56,17 @@ public SchemaStorage( RecordStore<DynamicRecord> schemaStore )
*/ */
public StoreIndexDescriptor indexGetForSchema( final IndexDescriptor descriptor ) public StoreIndexDescriptor indexGetForSchema( final IndexDescriptor descriptor )
{ {
Iterator<StoreIndexDescriptor> rules = loadAllSchemaRules( descriptor::equals, StoreIndexDescriptor.class, false ); Iterator<StoreIndexDescriptor> indexes = loadAllSchemaRules( descriptor::equals, StoreIndexDescriptor.class, false );


StoreIndexDescriptor foundRule = null; StoreIndexDescriptor foundRule = null;


while ( rules.hasNext() ) while ( indexes.hasNext() )
{ {
StoreIndexDescriptor candidate = rules.next(); StoreIndexDescriptor candidate = indexes.next();
if ( foundRule != null ) if ( foundRule != null )
{ {
throw new IllegalStateException( String.format( throw new IllegalStateException( String.format(
"Found more than one matching index rule, %s and %s", foundRule, candidate ) ); "Found more than one matching index, %s and %s", foundRule, candidate ) );
} }
foundRule = candidate; foundRule = candidate;
} }
Expand Down
Expand Up @@ -120,21 +120,20 @@ public static SchemaRule deserialize( long id, ByteBuffer source ) throws Malfor
/** /**
* Serialize the provided IndexRule onto the target buffer * Serialize the provided IndexRule onto the target buffer
* *
* @param indexRule the IndexRule to serialize * @param indexDescriptor the StoreIndexDescriptor to serialize
* @throws IllegalStateException if the IndexRule is of type unique, but the owning constrain has not been set * @throws IllegalStateException if the StoreIndexDescriptor is of type unique, but the owning constrain has not been set
*/ */
public static byte[] serialize( StoreIndexDescriptor indexRule ) public static byte[] serialize( StoreIndexDescriptor indexDescriptor )
{ {
ByteBuffer target = ByteBuffer.allocate( lengthOf( indexRule ) ); ByteBuffer target = ByteBuffer.allocate( lengthOf( indexDescriptor ) );
target.putInt( LEGACY_LABEL_OR_REL_TYPE_ID ); target.putInt( LEGACY_LABEL_OR_REL_TYPE_ID );
target.put( INDEX_RULE ); target.put( INDEX_RULE );


IndexProvider.Descriptor providerDescriptor = indexRule.providerDescriptor(); IndexProvider.Descriptor providerDescriptor = indexDescriptor.providerDescriptor();
UTF8.putEncodedStringInto( providerDescriptor.getKey(), target ); UTF8.putEncodedStringInto( providerDescriptor.getKey(), target );
UTF8.putEncodedStringInto( providerDescriptor.getVersion(), target ); UTF8.putEncodedStringInto( providerDescriptor.getVersion(), target );


IndexDescriptor schemaIndexDescriptor = indexRule; switch ( indexDescriptor.type() )
switch ( schemaIndexDescriptor.type() )
{ {
case GENERAL: case GENERAL:
target.put( GENERAL_INDEX ); target.put( GENERAL_INDEX );
Expand All @@ -144,17 +143,17 @@ public static byte[] serialize( StoreIndexDescriptor indexRule )
target.put( UNIQUE_INDEX ); target.put( UNIQUE_INDEX );


// The owning constraint can be null. See IndexRule.getOwningConstraint() // The owning constraint can be null. See IndexRule.getOwningConstraint()
Long owningConstraint = indexRule.getOwningConstraint(); Long owningConstraint = indexDescriptor.getOwningConstraint();
target.putLong( owningConstraint == null ? NO_OWNING_CONSTRAINT_YET : owningConstraint ); target.putLong( owningConstraint == null ? NO_OWNING_CONSTRAINT_YET : owningConstraint );
break; break;


default: default:
throw new UnsupportedOperationException( format( "Got unknown index descriptor type '%s'.", throw new UnsupportedOperationException( format( "Got unknown index descriptor type '%s'.",
schemaIndexDescriptor.type() ) ); indexDescriptor.type() ) );
} }


schemaIndexDescriptor.schema().processWith( new SchemaDescriptorSerializer( target ) ); indexDescriptor.schema().processWith( new SchemaDescriptorSerializer( target ) );
UTF8.putEncodedStringInto( indexRule.getName(), target ); UTF8.putEncodedStringInto( indexDescriptor.getName(), target );
return target.array(); return target.array();
} }


Expand Down Expand Up @@ -198,27 +197,26 @@ public static byte[] serialize( ConstraintRule constraintRule )


/** /**
* Compute the byte size needed to serialize the provided IndexRule using serialize. * Compute the byte size needed to serialize the provided IndexRule using serialize.
* @param indexRule the IndexRule * @param indexDescriptor the StoreIndexDescriptor
* @return the byte size of indexRule * @return the byte size of StoreIndexDescriptor
*/ */
public static int lengthOf( StoreIndexDescriptor indexRule ) public static int lengthOf( StoreIndexDescriptor indexDescriptor )
{ {
int length = 4; // legacy label or relType id int length = 4; // legacy label or relType id
length += 1; // schema rule type length += 1; // schema rule type


IndexProvider.Descriptor providerDescriptor = indexRule.providerDescriptor(); IndexProvider.Descriptor providerDescriptor = indexDescriptor.providerDescriptor();
length += UTF8.computeRequiredByteBufferSize( providerDescriptor.getKey() ); length += UTF8.computeRequiredByteBufferSize( providerDescriptor.getKey() );
length += UTF8.computeRequiredByteBufferSize( providerDescriptor.getVersion() ); length += UTF8.computeRequiredByteBufferSize( providerDescriptor.getVersion() );


length += 1; // index type length += 1; // index type
IndexDescriptor schemaIndexDescriptor = indexRule; if ( indexDescriptor.type() == IndexDescriptor.Type.UNIQUE )
if ( schemaIndexDescriptor.type() == IndexDescriptor.Type.UNIQUE )
{ {
length += 8; // owning constraint id length += 8; // owning constraint id
} }


length += schemaIndexDescriptor.schema().computeWith( schemaSizeComputer ); length += indexDescriptor.schema().computeWith( schemaSizeComputer );
length += UTF8.computeRequiredByteBufferSize( indexRule.getName() ); length += UTF8.computeRequiredByteBufferSize( indexDescriptor.getName() );
return length; return length;
} }


Expand Down
Expand Up @@ -599,38 +599,38 @@ public ConstraintCreator createDeferredConstraint( Label label )
return new BaseNodeConstraintCreator( new BatchSchemaActions(), label ); return new BaseNodeConstraintCreator( new BatchSchemaActions(), label );
} }


private void createUniqueIndexAndOwningConstraint( IndexDescriptor schemaIndexDescriptor, private void createUniqueIndexAndOwningConstraint( IndexDescriptor indexDescriptor,
IndexBackedConstraintDescriptor constraintDescriptor ) IndexBackedConstraintDescriptor constraintDescriptor )
{ {
// TODO: Do not create duplicate index // TODO: Do not create duplicate index


long indexRuleId = schemaStore.nextId(); long indexId = schemaStore.nextId();
long constraintRuleId = schemaStore.nextId(); long constraintRuleId = schemaStore.nextId();


StoreIndexDescriptor indexRule = StoreIndexDescriptor storeIndexDescriptor =
StoreIndexDescriptor.constraintIndexRule( StoreIndexDescriptor.constraintIndexRule(
indexRuleId, indexId,
schemaIndexDescriptor, indexDescriptor,
this.indexProviderMap.getDefaultProvider().getProviderDescriptor(), this.indexProviderMap.getDefaultProvider().getProviderDescriptor(),
constraintRuleId constraintRuleId
); );
ConstraintRule constraintRule = ConstraintRule constraintRule =
ConstraintRule.constraintRule( ConstraintRule.constraintRule(
constraintRuleId, constraintRuleId,
constraintDescriptor, constraintDescriptor,
indexRuleId indexId
); );


for ( DynamicRecord record : schemaStore.allocateFrom( constraintRule ) ) for ( DynamicRecord record : schemaStore.allocateFrom( constraintRule ) )
{ {
schemaStore.updateRecord( record ); schemaStore.updateRecord( record );
} }
schemaCache.addSchemaRule( constraintRule ); schemaCache.addSchemaRule( constraintRule );
for ( DynamicRecord record : schemaStore.allocateFrom( indexRule ) ) for ( DynamicRecord record : schemaStore.allocateFrom( storeIndexDescriptor ) )
{ {
schemaStore.updateRecord( record ); schemaStore.updateRecord( record );
} }
schemaCache.addSchemaRule( indexRule ); schemaCache.addSchemaRule( storeIndexDescriptor );
labelsTouched = true; labelsTouched = true;
flushStrategy.forceFlush(); flushStrategy.forceFlush();
} }
Expand Down
Expand Up @@ -797,11 +797,11 @@ public void shouldWaitForRecoveredUniquenessConstraintIndexesToBeFullyPopulated(
IndexingService.Monitor monitor = new IndexingService.MonitorAdapter() IndexingService.Monitor monitor = new IndexingService.MonitorAdapter()
{ {
@Override @Override
public void awaitingPopulationOfRecoveredIndex( long index, IndexDescriptor descriptor ) public void awaitingPopulationOfRecoveredIndex( StoreIndexDescriptor descriptor )
{ {
// When we see that we start to await the index to populate, notify the slow-as-heck // When we see that we start to await the index to populate, notify the slow-as-heck
// populator that it can actually go and complete its job. // populator that it can actually go and complete its job.
indexId.set( index ); indexId.set( descriptor.getId() );
latch.startAndWaitForAllToStart(); latch.startAndWaitForAllToStart();
} }
}; };
Expand Down

0 comments on commit d5d06c1

Please sign in to comment.