@Override public String getName() { return indexReference == null ? IndexReference.UNNAMED_INDEX : indexReference.name(); }
private void awaitOnline( IndexReference indexReference ) throws IndexNotFoundKernelException { // We do the isAdded check on the transaction state first, because indexGetState will grab a schema read-lock, which can deadlock on the write-lock // held by the index populator. Also, if we index was created in this transaction, then we will never see it come online in this transaction anyway. // Indexes don't come online until the transaction that creates them has committed. if ( !((KernelTransactionImplementation)tx).txState().indexDiffSetsBySchema( indexReference.schema() ).isAdded( (IndexDescriptor) indexReference ) ) { // If the index was not created in this transaction, then wait for it to come online before querying. Schema schema = db.schema(); IndexDefinition index = schema.getIndexByName( indexReference.name() ); schema.awaitIndexOnline( index, INDEX_ONLINE_QUERY_TIMEOUT_SECONDS, TimeUnit.SECONDS ); } // If the index was created in this transaction, then we skip this check entirely. // We will get an exception later, when we try to get an IndexReader, so this is fine. }
result.add( new IndexResult( indexId, description, index.name(), tokenNames, propertyNames,
@Override public String getName() { return indexReference == null ? IndexReference.UNNAMED_INDEX : indexReference.name(); }
result.add( new IndexResult( indexId, description, index.name(), tokenNames, propertyNames,