-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
Read.java
683 lines (602 loc) · 23.3 KB
/
Read.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
/*
* Copyright (c) 2002-2018 "Neo4j,"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.impl.newapi;
import java.util.Arrays;
import org.neo4j.internal.kernel.api.IndexOrder;
import org.neo4j.internal.kernel.api.IndexQuery;
import org.neo4j.internal.kernel.api.IndexReference;
import org.neo4j.internal.kernel.api.NodeCursor;
import org.neo4j.internal.kernel.api.NodeExplicitIndexCursor;
import org.neo4j.internal.kernel.api.NodeLabelIndexCursor;
import org.neo4j.internal.kernel.api.NodeValueIndexCursor;
import org.neo4j.internal.kernel.api.PropertyCursor;
import org.neo4j.internal.kernel.api.RelationshipExplicitIndexCursor;
import org.neo4j.internal.kernel.api.RelationshipGroupCursor;
import org.neo4j.internal.kernel.api.RelationshipScanCursor;
import org.neo4j.internal.kernel.api.RelationshipTraversalCursor;
import org.neo4j.internal.kernel.api.Scan;
import org.neo4j.internal.kernel.api.exceptions.KernelException;
import org.neo4j.internal.kernel.api.exceptions.explicitindex.ExplicitIndexNotFoundKernelException;
import org.neo4j.internal.kernel.api.exceptions.schema.IndexNotApplicableKernelException;
import org.neo4j.internal.kernel.api.exceptions.schema.IndexNotFoundKernelException;
import org.neo4j.internal.kernel.api.schema.SchemaDescriptor;
import org.neo4j.internal.kernel.api.security.AccessMode;
import org.neo4j.kernel.api.AssertOpen;
import org.neo4j.kernel.api.ExplicitIndex;
import org.neo4j.kernel.api.ExplicitIndexHits;
import org.neo4j.kernel.api.exceptions.schema.IndexBrokenKernelException;
import org.neo4j.kernel.api.txstate.ExplicitIndexTransactionState;
import org.neo4j.kernel.api.txstate.TransactionState;
import org.neo4j.kernel.api.txstate.TxStateHolder;
import org.neo4j.kernel.impl.api.KernelTransactionImplementation;
import org.neo4j.kernel.impl.locking.LockTracer;
import org.neo4j.kernel.impl.locking.Locks;
import org.neo4j.kernel.impl.locking.ResourceTypes;
import org.neo4j.storageengine.api.lock.ResourceType;
import org.neo4j.storageengine.api.schema.IndexProgressor;
import org.neo4j.storageengine.api.schema.IndexReader;
import org.neo4j.storageengine.api.schema.LabelScanReader;
import org.neo4j.values.storable.Value;
import org.neo4j.values.storable.ValueGroup;
import org.neo4j.values.storable.Values;
import static java.lang.String.format;
import static org.neo4j.internal.kernel.api.schema.SchemaDescriptor.schemaTokenLockingIds;
import static org.neo4j.kernel.impl.locking.ResourceTypes.INDEX_ENTRY;
import static org.neo4j.kernel.impl.locking.ResourceTypes.indexEntryResourceId;
import static org.neo4j.values.storable.ValueGroup.GEOMETRY;
import static org.neo4j.values.storable.ValueGroup.NUMBER;
abstract class Read implements TxStateHolder,
org.neo4j.internal.kernel.api.Read,
org.neo4j.internal.kernel.api.ExplicitIndexRead,
org.neo4j.internal.kernel.api.SchemaRead,
org.neo4j.internal.kernel.api.Procedures,
org.neo4j.internal.kernel.api.Locks, AssertOpen
{
private final DefaultCursors cursors;
final KernelTransactionImplementation ktx;
Read( DefaultCursors cursors, KernelTransactionImplementation ktx )
{
this.cursors = cursors;
this.ktx = ktx;
}
@Override
public final void nodeIndexSeek(
IndexReference index,
NodeValueIndexCursor cursor,
IndexOrder indexOrder,
IndexQuery... query ) throws IndexNotApplicableKernelException, IndexNotFoundKernelException
{
ktx.assertOpen();
if ( hasForbiddenProperties( index ) )
{
cursor.close();
return;
}
DefaultNodeValueIndexCursor cursorImpl = (DefaultNodeValueIndexCursor) cursor;
IndexReader reader = indexReader( index, false );
cursorImpl.setRead( this, null );
IndexProgressor.NodeValueClient target = withFullValuePrecision( cursorImpl, query, reader );
reader.query( target, indexOrder, query );
}
private IndexProgressor.NodeValueClient withFullValuePrecision( DefaultNodeValueIndexCursor cursor,
IndexQuery[] query, IndexReader reader )
{
IndexProgressor.NodeValueClient target = cursor;
if ( !reader.hasFullValuePrecision( query ) )
{
IndexQuery[] filters = new IndexQuery[query.length];
int j = 0;
for ( IndexQuery q : query )
{
switch ( q.type() )
{
case range:
ValueGroup valueGroup = q.valueGroup();
if ( ( valueGroup == NUMBER || valueGroup == GEOMETRY) && !reader.hasFullValuePrecision( q ) )
{
filters[j++] = q;
}
break;
case exact:
Value value = ((IndexQuery.ExactPredicate) q).value();
if ( value.valueGroup() == ValueGroup.NUMBER || Values.isArrayValue( value ) || value.valueGroup() == ValueGroup.GEOMETRY )
{
if ( !reader.hasFullValuePrecision( q ) )
{
filters[j++] = q;
}
}
break;
default:
break;
}
}
if ( j > 0 )
{
filters = Arrays.copyOf( filters, j );
target = new NodeValueClientFilter( target, cursors.allocateNodeCursor(),
cursors.allocatePropertyCursor(), this, filters );
}
}
return target;
}
@Override
public final long lockingNodeUniqueIndexSeek(
IndexReference index,
IndexQuery.ExactPredicate... predicates )
throws IndexNotApplicableKernelException, IndexNotFoundKernelException, IndexBrokenKernelException
{
assertIndexOnline( index );
assertPredicatesMatchSchema( index, predicates );
Locks.Client locks = ktx.statementLocks().optimistic();
LockTracer lockTracer = ktx.lockTracer();
int[] entityTokenIds = index.schema().getEntityTokenIds();
if ( entityTokenIds.length != 1 )
{
throw new IndexNotApplicableKernelException( "Multi-token index " + index + " does not support uniqueness." );
}
long indexEntryId = indexEntryResourceId( entityTokenIds[0], predicates );
//First try to find node under a shared lock
//if not found upgrade to exclusive and try again
locks.acquireShared( lockTracer, INDEX_ENTRY, indexEntryId );
try ( DefaultNodeValueIndexCursor cursor = cursors.allocateNodeValueIndexCursor() )
{
nodeIndexSeekWithFreshIndexReader( index, cursor, predicates );
if ( !cursor.next() )
{
locks.releaseShared( INDEX_ENTRY, indexEntryId );
locks.acquireExclusive( lockTracer, INDEX_ENTRY, indexEntryId );
nodeIndexSeekWithFreshIndexReader( index, cursor, predicates );
if ( cursor.next() ) // we found it under the exclusive lock
{
// downgrade to a shared lock
locks.acquireShared( lockTracer, INDEX_ENTRY, indexEntryId );
locks.releaseExclusive( INDEX_ENTRY, indexEntryId );
}
}
return cursor.nodeReference();
}
}
void nodeIndexSeekWithFreshIndexReader(
IndexReference index,
DefaultNodeValueIndexCursor cursor,
IndexQuery.ExactPredicate... query ) throws IndexNotFoundKernelException, IndexNotApplicableKernelException
{
IndexReader reader = indexReader( index, true );
cursor.setRead( this, reader );
IndexProgressor.NodeValueClient target = withFullValuePrecision( cursor, query, reader );
reader.query( target, IndexOrder.NONE, query );
}
@Override
public final void nodeIndexScan(
IndexReference index,
NodeValueIndexCursor cursor,
IndexOrder indexOrder ) throws KernelException
{
ktx.assertOpen();
if ( hasForbiddenProperties( index ) )
{
cursor.close();
return;
}
// for a scan, we simply query for existence of the first property, which covers all entries in an index
int firstProperty = index.properties()[0];
((DefaultNodeValueIndexCursor) cursor).setRead( this, null );
indexReader( index, false ).query( (DefaultNodeValueIndexCursor) cursor, indexOrder, IndexQuery.exists( firstProperty ) );
}
private boolean hasForbiddenProperties( IndexReference index )
{
AccessMode mode = ktx.securityContext().mode();
for ( int prop : index.properties() )
{
if ( !mode.allowsPropertyReads( prop ) )
{
return true;
}
}
return false;
}
@Override
public final void nodeLabelScan( int label, NodeLabelIndexCursor cursor )
{
ktx.assertOpen();
DefaultNodeLabelIndexCursor indexCursor = (DefaultNodeLabelIndexCursor) cursor;
indexCursor.setRead( this );
labelScanReader().nodesWithLabel( indexCursor, label);
}
@Override
public void nodeLabelUnionScan( NodeLabelIndexCursor cursor, int... labels )
{
ktx.assertOpen();
DefaultNodeLabelIndexCursor client = (DefaultNodeLabelIndexCursor) cursor;
client.setRead( this );
client.unionScan( new NodeLabelIndexProgressor( labelScanReader().nodesWithAnyOfLabels( labels ), client ),
false, labels );
}
@Override
public void nodeLabelIntersectionScan( NodeLabelIndexCursor cursor, int... labels )
{
ktx.assertOpen();
DefaultNodeLabelIndexCursor client = (DefaultNodeLabelIndexCursor) cursor;
client.setRead( this );
client.intersectionScan(
new NodeLabelIndexProgressor( labelScanReader().nodesWithAllLabels( labels ), client ),
false, labels );
}
@Override
public final Scan<NodeLabelIndexCursor> nodeLabelScan( int label )
{
ktx.assertOpen();
throw new UnsupportedOperationException( "not implemented" );
}
@Override
public final void allNodesScan( NodeCursor cursor )
{
ktx.assertOpen();
((DefaultNodeCursor) cursor).scan( this );
}
@Override
public final Scan<NodeCursor> allNodesScan()
{
ktx.assertOpen();
throw new UnsupportedOperationException( "not implemented" );
}
@Override
public final void singleNode( long reference, NodeCursor cursor )
{
ktx.assertOpen();
((DefaultNodeCursor) cursor).single( reference, this );
}
@Override
public final void singleRelationship( long reference, RelationshipScanCursor cursor )
{
ktx.assertOpen();
((DefaultRelationshipScanCursor) cursor).single( reference, this );
}
@Override
public final void allRelationshipsScan( RelationshipScanCursor cursor )
{
ktx.assertOpen();
((DefaultRelationshipScanCursor) cursor).scan( -1/*include all labels*/, this );
}
@Override
public final Scan<RelationshipScanCursor> allRelationshipsScan()
{
ktx.assertOpen();
throw new UnsupportedOperationException( "not implemented" );
}
@Override
public final void relationshipTypeScan( int type, RelationshipScanCursor cursor )
{
ktx.assertOpen();
((DefaultRelationshipScanCursor) cursor).scan( type, this );
}
@Override
public final Scan<RelationshipScanCursor> relationshipTypeScan( int type )
{
ktx.assertOpen();
throw new UnsupportedOperationException( "not implemented" );
}
@Override
public void relationshipGroups( long nodeReference, long reference, RelationshipGroupCursor cursor )
{
((DefaultRelationshipGroupCursor) cursor).init( nodeReference, reference, this );
}
@Override
public void relationships( long nodeReference, long reference, RelationshipTraversalCursor cursor )
{
((DefaultRelationshipTraversalCursor) cursor).init( nodeReference, reference, this );
}
@Override
public void nodeProperties( long nodeReference, long reference, PropertyCursor cursor )
{
((DefaultPropertyCursor) cursor).initNode( nodeReference, reference, this, ktx );
}
@Override
public void relationshipProperties( long relationshipReference, long reference, PropertyCursor cursor )
{
((DefaultPropertyCursor) cursor).initRelationship( relationshipReference, reference, this, ktx );
}
@Override
public final void graphProperties( PropertyCursor cursor )
{
ktx.assertOpen();
((DefaultPropertyCursor) cursor).initGraph( graphPropertiesReference(), this, ktx );
}
abstract long graphPropertiesReference();
@Override
public final void nodeExplicitIndexLookup(
NodeExplicitIndexCursor cursor, String index, String key, Object value )
throws ExplicitIndexNotFoundKernelException
{
ktx.assertOpen();
((DefaultNodeExplicitIndexCursor) cursor).setRead( this );
explicitIndex( (DefaultNodeExplicitIndexCursor) cursor,
explicitNodeIndex( index ).get( key, value ) );
}
@Override
public final void nodeExplicitIndexQuery(
NodeExplicitIndexCursor cursor, String index, Object query )
throws ExplicitIndexNotFoundKernelException
{
ktx.assertOpen();
((DefaultNodeExplicitIndexCursor) cursor).setRead( this );
explicitIndex( (DefaultNodeExplicitIndexCursor) cursor, explicitNodeIndex( index ).query(
query instanceof Value ? ((Value) query).asObject() : query ) );
}
@Override
public final void nodeExplicitIndexQuery(
NodeExplicitIndexCursor cursor, String index, String key, Object query )
throws ExplicitIndexNotFoundKernelException
{
ktx.assertOpen();
((DefaultNodeExplicitIndexCursor) cursor).setRead( this );
explicitIndex( (DefaultNodeExplicitIndexCursor) cursor, explicitNodeIndex( index ).query(
key, query instanceof Value ? ((Value) query).asObject() : query ) );
}
@Override
public void relationshipExplicitIndexLookup(
RelationshipExplicitIndexCursor cursor,
String index,
String key,
Object value,
long source,
long target ) throws ExplicitIndexNotFoundKernelException
{
ktx.assertOpen();
((DefaultRelationshipExplicitIndexCursor) cursor).setRead( this );
explicitIndex(
(DefaultRelationshipExplicitIndexCursor) cursor,
explicitRelationshipIndex( index ).get( key, value, source, target ) );
}
@Override
public void relationshipExplicitIndexQuery(
RelationshipExplicitIndexCursor cursor,
String index,
Object query,
long source,
long target ) throws ExplicitIndexNotFoundKernelException
{
ktx.assertOpen();
((DefaultRelationshipExplicitIndexCursor) cursor).setRead( this );
explicitIndex(
(DefaultRelationshipExplicitIndexCursor) cursor,
explicitRelationshipIndex( index )
.query( query instanceof Value ? ((Value) query).asObject() : query, source, target ) );
}
@Override
public void relationshipExplicitIndexQuery(
RelationshipExplicitIndexCursor cursor,
String index,
String key,
Object query,
long source,
long target ) throws ExplicitIndexNotFoundKernelException
{
ktx.assertOpen();
((DefaultRelationshipExplicitIndexCursor) cursor).setRead( this );
explicitIndex(
(DefaultRelationshipExplicitIndexCursor) cursor,
explicitRelationshipIndex( index ).query(
key, query instanceof Value ? ((Value) query).asObject() : query, source, target ) );
}
private static void explicitIndex( IndexProgressor.ExplicitClient client, ExplicitIndexHits hits )
{
client.initialize( new ExplicitIndexProgressor( hits, client ), hits.size() );
}
@Override
public final void futureNodeReferenceRead( long reference )
{
ktx.assertOpen();
}
@Override
public final void futureRelationshipsReferenceRead( long reference )
{
ktx.assertOpen();
}
@Override
public final void futureNodePropertyReferenceRead( long reference )
{
ktx.assertOpen();
}
@Override
public final void futureRelationshipPropertyReferenceRead( long reference )
{
ktx.assertOpen();
}
public abstract IndexReader indexReader( IndexReference index, boolean fresh ) throws IndexNotFoundKernelException;
abstract LabelScanReader labelScanReader();
abstract ExplicitIndex explicitNodeIndex( String indexName ) throws ExplicitIndexNotFoundKernelException;
abstract ExplicitIndex explicitRelationshipIndex( String indexName ) throws ExplicitIndexNotFoundKernelException;
@Override
public abstract IndexReference index( int label, int... properties );
@Override
public TransactionState txState()
{
return ktx.txState();
}
@Override
public ExplicitIndexTransactionState explicitIndexTxState()
{
return ktx.explicitIndexTxState();
}
@Override
public boolean hasTxStateWithChanges()
{
return ktx.hasTxStateWithChanges();
}
@Override
public void acquireExclusiveNodeLock( long... ids )
{
acquireExclusiveLock( ResourceTypes.NODE, ids );
ktx.assertOpen();
}
@Override
public void acquireExclusiveRelationshipLock( long... ids )
{
acquireExclusiveLock( ResourceTypes.RELATIONSHIP, ids );
ktx.assertOpen();
}
@Override
public void acquireExclusiveExplicitIndexLock( long... ids )
{
acquireExclusiveLock( ResourceTypes.EXPLICIT_INDEX, ids );
ktx.assertOpen();
}
@Override
public void acquireExclusiveLabelLock( long... ids )
{
acquireExclusiveLock( ResourceTypes.LABEL, ids );
ktx.assertOpen();
}
@Override
public void releaseExclusiveNodeLock( long... ids )
{
releaseExclusiveLock( ResourceTypes.NODE, ids );
ktx.assertOpen();
}
@Override
public void releaseExclusiveRelationshipLock( long... ids )
{
releaseExclusiveLock( ResourceTypes.RELATIONSHIP, ids );
ktx.assertOpen();
}
@Override
public void releaseExclusiveExplicitIndexLock( long... ids )
{
releaseExclusiveLock( ResourceTypes.EXPLICIT_INDEX, ids );
ktx.assertOpen();
}
@Override
public void releaseExclusiveLabelLock( long... ids )
{
releaseExclusiveLock( ResourceTypes.LABEL, ids );
ktx.assertOpen();
}
@Override
public void acquireSharedNodeLock( long... ids )
{
acquireSharedLock( ResourceTypes.NODE, ids );
ktx.assertOpen();
}
@Override
public void acquireSharedRelationshipLock( long... ids )
{
acquireSharedLock( ResourceTypes.RELATIONSHIP, ids );
ktx.assertOpen();
}
@Override
public void acquireSharedExplicitIndexLock( long... ids )
{
acquireSharedLock( ResourceTypes.EXPLICIT_INDEX, ids );
ktx.assertOpen();
}
@Override
public void acquireSharedLabelLock( long... ids )
{
acquireSharedLock( ResourceTypes.LABEL, ids );
ktx.assertOpen();
}
@Override
public void releaseSharedNodeLock( long... ids )
{
releaseSharedLock( ResourceTypes.NODE, ids );
ktx.assertOpen();
}
@Override
public void releaseSharedRelationshipLock( long... ids )
{
releaseSharedLock( ResourceTypes.RELATIONSHIP, ids );
ktx.assertOpen();
}
@Override
public void releaseSharedExplicitIndexLock( long... ids )
{
releaseSharedLock( ResourceTypes.EXPLICIT_INDEX, ids );
ktx.assertOpen();
}
@Override
public void releaseSharedLabelLock( long... ids )
{
releaseSharedLock( ResourceTypes.LABEL, ids );
ktx.assertOpen();
}
void acquireSharedSchemaLock( SchemaDescriptor schema )
{
long[] lockingIds = schemaTokenLockingIds( schema );
ktx.statementLocks().optimistic().acquireShared( ktx.lockTracer(), schema.keyType(), lockingIds );
}
void acquireSharedLock( ResourceType resource, long resourceId )
{
ktx.statementLocks().optimistic().acquireShared( ktx.lockTracer(), resource, resourceId );
}
private void acquireExclusiveLock( ResourceTypes types, long... ids )
{
ktx.statementLocks().pessimistic().acquireExclusive( ktx.lockTracer(), types, ids );
}
private void releaseExclusiveLock( ResourceTypes types, long... ids )
{
ktx.statementLocks().pessimistic().releaseExclusive( types, ids );
}
private void acquireSharedLock( ResourceTypes types, long... ids )
{
ktx.statementLocks().pessimistic().acquireShared( ktx.lockTracer(), types, ids );
}
private void releaseSharedLock( ResourceTypes types, long... ids )
{
ktx.statementLocks().pessimistic().releaseShared( types, ids );
}
private void assertIndexOnline( IndexReference index )
throws IndexNotFoundKernelException, IndexBrokenKernelException
{
switch ( indexGetState( index ) )
{
case ONLINE:
return;
default:
throw new IndexBrokenKernelException( indexGetFailure( index ) );
}
}
private static void assertPredicatesMatchSchema( IndexReference index, IndexQuery.ExactPredicate[] predicates )
throws IndexNotApplicableKernelException
{
int[] propertyIds = index.properties();
if ( propertyIds.length != predicates.length )
{
throw new IndexNotApplicableKernelException(
format( "The index specifies %d properties, but only %d lookup predicates were given.",
propertyIds.length, predicates.length ) );
}
for ( int i = 0; i < predicates.length; i++ )
{
if ( predicates[i].propertyKeyId() != propertyIds[i] )
{
throw new IndexNotApplicableKernelException(
format( "The index has the property id %d in position %d, but the lookup property id was %d.",
propertyIds[i], i, predicates[i].propertyKeyId() ) );
}
}
}
@Override
public void assertOpen()
{
ktx.assertOpen();
}
}