<p dir="auto">I discovered that when I use the LIMIT operator in the RETURN, the database returns invalid results sometimes (non-deterministic) - but only on large size patterns/quiers. I.e: Altough there are 4 matches in the database, the database returns no matches when using LIMIT 1 (or 2,3), but 4 when using LIMIT 4. After restarting the database the error disappears sometimes - but sometimes not.</p>
<p dir="auto">Has this issue been fixed in recent releases? If not, please use the following steps to reproduce the problem: Note: be advised, that the problem occures only sporadic.</p>
<ul dir="auto">
<li>Neo4j version: 3.5.2</li>
<li>Operating system: Win10 x64</li>
<li>API/Driver: Neo4j Browser or JavaAPI</li>
</ul>
<p dir="auto">Steps:</p>
<ol dir="auto">
<li>Initiate Database, run the following queries. The query create a game board with 4x4 fields( label <em>:Field</em>), which are connected by <em>:right</em> and <em>:bottom</em> edges to their neighbors, and a node <em>:Board</em>, with edges to every <em>:Field</em>.</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CREATE
(f00: Field {name: &quot;f00&quot;})-[:right]-&gt;(f01: Field {name: &quot;f01&quot;})-[:right]-&gt;(f02: Field {name: &quot;f02&quot;})-[:right]-&gt;(f03:Field {name: &quot;f03&quot;}), 
(f10: Field {name: &quot;f10&quot;})-[:right]-&gt;(f11: Field {name: &quot;f11&quot;})-[:right]-&gt;(f12: Field {name: &quot;f12&quot;})-[:right]-&gt;(f13:Field {name: &quot;f13&quot;}), 
(f20: Field {name: &quot;f20&quot;})-[:right]-&gt;(f21: Field {name: &quot;f21&quot;})-[:right]-&gt;(f22: Field {name: &quot;f22&quot;})-[:right]-&gt;(f23:Field {name: &quot;f23&quot;}), 
(f30: Field {name: &quot;f30&quot;})-[:right]-&gt;(f31: Field {name: &quot;f31&quot;})-[:right]-&gt;(f32: Field {name: &quot;f32&quot;})-[:right]-&gt;(f33:Field {name: &quot;f33&quot;}), 
(f00)-[:bottom]-&gt;(f10)-[:bottom]-&gt;(f20)-[:bottom]-&gt;(f30), 
(f01)-[:bottom]-&gt;(f11)-[:bottom]-&gt;(f21)-[:bottom]-&gt;(f31), 
(f02)-[:bottom]-&gt;(f12)-[:bottom]-&gt;(f22)-[:bottom]-&gt;(f32), 
(f03)-[:bottom]-&gt;(f13)-[:bottom]-&gt;(f23)-[:bottom]-&gt;(f33),
(b:Board)"><pre class="notranslate"><code class="notranslate">CREATE
(f00: Field {name: "f00"})-[:right]-&gt;(f01: Field {name: "f01"})-[:right]-&gt;(f02: Field {name: "f02"})-[:right]-&gt;(f03:Field {name: "f03"}), 
(f10: Field {name: "f10"})-[:right]-&gt;(f11: Field {name: "f11"})-[:right]-&gt;(f12: Field {name: "f12"})-[:right]-&gt;(f13:Field {name: "f13"}), 
(f20: Field {name: "f20"})-[:right]-&gt;(f21: Field {name: "f21"})-[:right]-&gt;(f22: Field {name: "f22"})-[:right]-&gt;(f23:Field {name: "f23"}), 
(f30: Field {name: "f30"})-[:right]-&gt;(f31: Field {name: "f31"})-[:right]-&gt;(f32: Field {name: "f32"})-[:right]-&gt;(f33:Field {name: "f33"}), 
(f00)-[:bottom]-&gt;(f10)-[:bottom]-&gt;(f20)-[:bottom]-&gt;(f30), 
(f01)-[:bottom]-&gt;(f11)-[:bottom]-&gt;(f21)-[:bottom]-&gt;(f31), 
(f02)-[:bottom]-&gt;(f12)-[:bottom]-&gt;(f22)-[:bottom]-&gt;(f32), 
(f03)-[:bottom]-&gt;(f13)-[:bottom]-&gt;(f23)-[:bottom]-&gt;(f33),
(b:Board)
</code></pre></div>
<p dir="auto">and</p>
<p dir="auto"><code class="notranslate">MATCH (f:Field), (b:Board) CREATE (b)-[:fields]-&gt;(f)</code></p>
<ol start="2" dir="auto">
<li>Execute the pattern matching query.</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MATCH 
(b:Board)-[b_fields_0_field11:fields]-&gt;(field11:Field), (b:Board)-[b_fields_1_field12:fields]-&gt;(field12:Field), (b:Board)-[b_fields_2_field13:fields]-&gt;(field13:Field), (b:Board)-[b_fields_3_field21:fields]-&gt;(field21:Field), (b:Board)-[b_fields_4_field22:fields]-&gt;(field22:Field), (b:Board)-[b_fields_5_field23:fields]-&gt;(field23:Field), (b:Board)-[b_fields_6_field31:fields]-&gt;(field31:Field), (b:Board)-[b_fields_7_field32:fields]-&gt;(field32:Field), (b:Board)-[b_fields_8_field33:fields]-&gt;(field33:Field), 
(field11:Field)-[field11_right_0_field12:right]-&gt;(field12:Field), (field11:Field)-[field11_bottom_1_field21:bottom]-&gt;(field21:Field), 
(field12:Field)-[field12_right_0_field13:right]-&gt;(field13:Field), (field12:Field)-[field12_bottom_1_field22:bottom]-&gt;(field22:Field), 
(field13:Field)-[field13_bottom_0_field23:bottom]-&gt;(field23:Field), 
(field21:Field)-[field21_right_0_field22:right]-&gt;(field22:Field), (field21:Field)-[field21_bottom_1_field31:bottom]-&gt;(field31:Field), 
(field22:Field)-[field22_right_0_field23:right]-&gt;(field23:Field), (field22:Field)-[field22_bottom_1_field32:bottom]-&gt;(field32:Field), 
(field23:Field)-[field23_bottom_0_field33:bottom]-&gt;(field33:Field), 
(field31:Field)-[field31_right_0_field32:right]-&gt;(field32:Field), 
(field32:Field)-[field32_right_0_field33:right]-&gt;(field33:Field), 
(field33:Field)
WHERE  NOT id(field11) = id(field12) AND NOT id(field11) = id(field13) AND NOT id(field11) = id(field21) AND NOT id(field11) = id(field22) AND NOT id(field11) = id(field23) AND NOT id(field11) = id(field31) AND NOT id(field11) = id(field32) AND NOT id(field11) = id(field33)
AND NOT id(field12) = id(field13) AND NOT id(field12) = id(field21) AND NOT id(field12) = id(field22) AND NOT id(field12) = id(field23) AND NOT id(field12) = id(field31) AND NOT id(field12) = id(field32) AND NOT id(field12) = id(field33)
AND NOT id(field13) = id(field21) AND NOT id(field13) = id(field22) AND NOT id(field13) = id(field23) AND NOT id(field13) = id(field31) AND NOT id(field13) = id(field32) AND NOT id(field13) = id(field33)
AND NOT id(field21) = id(field22) AND NOT id(field21) = id(field23) AND NOT id(field21) = id(field31) AND NOT id(field21) = id(field32) AND NOT id(field21) = id(field33)
AND NOT id(field22) = id(field23) AND NOT id(field22) = id(field31) AND NOT id(field22) = id(field32) AND NOT id(field22) = id(field33)
AND NOT id(field23) = id(field31) AND NOT id(field23) = id(field32) AND NOT id(field23) = id(field33)
AND NOT id(field31) = id(field32) AND NOT id(field31) = id(field33)
AND NOT id(field32) = id(field33)
RETURN 
id(b_fields_0_field11) AS b_fields_0_field11, id(b_fields_1_field12) AS b_fields_1_field12, id(b_fields_2_field13) AS b_fields_2_field13,
id(b_fields_3_field21) AS b_fields_3_field21, id(b_fields_4_field22) AS b_fields_4_field22, id(b_fields_5_field23) AS b_fields_5_field23,
id(b_fields_6_field31) AS b_fields_6_field31, id(b_fields_7_field32) AS b_fields_7_field32, id(b_fields_8_field33) AS b_fields_8_field33,
id(field11_right_0_field12) AS field11_right_0_field12, id(field11_bottom_1_field21) AS field11_bottom_1_field21, id(field12_right_0_field13) AS field12_right_0_field13,
id(field12_bottom_1_field22) AS field12_bottom_1_field22, id(field13_bottom_0_field23) AS field13_bottom_0_field23, id(field21_right_0_field22) AS field21_right_0_field22, 
id(field21_bottom_1_field31) AS field21_bottom_1_field31, id(field22_right_0_field23) AS field22_right_0_field23, id(field22_bottom_1_field32) AS field22_bottom_1_field32,
id(field23_bottom_0_field33) AS field23_bottom_0_field33, id(field31_right_0_field32) AS field31_right_0_field32, id(field32_right_0_field33) AS field32_right_0_field33, id(field33) AS field33
 LIMIT 1"><pre class="notranslate"><code class="notranslate">MATCH 
(b:Board)-[b_fields_0_field11:fields]-&gt;(field11:Field), (b:Board)-[b_fields_1_field12:fields]-&gt;(field12:Field), (b:Board)-[b_fields_2_field13:fields]-&gt;(field13:Field), (b:Board)-[b_fields_3_field21:fields]-&gt;(field21:Field), (b:Board)-[b_fields_4_field22:fields]-&gt;(field22:Field), (b:Board)-[b_fields_5_field23:fields]-&gt;(field23:Field), (b:Board)-[b_fields_6_field31:fields]-&gt;(field31:Field), (b:Board)-[b_fields_7_field32:fields]-&gt;(field32:Field), (b:Board)-[b_fields_8_field33:fields]-&gt;(field33:Field), 
(field11:Field)-[field11_right_0_field12:right]-&gt;(field12:Field), (field11:Field)-[field11_bottom_1_field21:bottom]-&gt;(field21:Field), 
(field12:Field)-[field12_right_0_field13:right]-&gt;(field13:Field), (field12:Field)-[field12_bottom_1_field22:bottom]-&gt;(field22:Field), 
(field13:Field)-[field13_bottom_0_field23:bottom]-&gt;(field23:Field), 
(field21:Field)-[field21_right_0_field22:right]-&gt;(field22:Field), (field21:Field)-[field21_bottom_1_field31:bottom]-&gt;(field31:Field), 
(field22:Field)-[field22_right_0_field23:right]-&gt;(field23:Field), (field22:Field)-[field22_bottom_1_field32:bottom]-&gt;(field32:Field), 
(field23:Field)-[field23_bottom_0_field33:bottom]-&gt;(field33:Field), 
(field31:Field)-[field31_right_0_field32:right]-&gt;(field32:Field), 
(field32:Field)-[field32_right_0_field33:right]-&gt;(field33:Field), 
(field33:Field)
WHERE  NOT id(field11) = id(field12) AND NOT id(field11) = id(field13) AND NOT id(field11) = id(field21) AND NOT id(field11) = id(field22) AND NOT id(field11) = id(field23) AND NOT id(field11) = id(field31) AND NOT id(field11) = id(field32) AND NOT id(field11) = id(field33)
AND NOT id(field12) = id(field13) AND NOT id(field12) = id(field21) AND NOT id(field12) = id(field22) AND NOT id(field12) = id(field23) AND NOT id(field12) = id(field31) AND NOT id(field12) = id(field32) AND NOT id(field12) = id(field33)
AND NOT id(field13) = id(field21) AND NOT id(field13) = id(field22) AND NOT id(field13) = id(field23) AND NOT id(field13) = id(field31) AND NOT id(field13) = id(field32) AND NOT id(field13) = id(field33)
AND NOT id(field21) = id(field22) AND NOT id(field21) = id(field23) AND NOT id(field21) = id(field31) AND NOT id(field21) = id(field32) AND NOT id(field21) = id(field33)
AND NOT id(field22) = id(field23) AND NOT id(field22) = id(field31) AND NOT id(field22) = id(field32) AND NOT id(field22) = id(field33)
AND NOT id(field23) = id(field31) AND NOT id(field23) = id(field32) AND NOT id(field23) = id(field33)
AND NOT id(field31) = id(field32) AND NOT id(field31) = id(field33)
AND NOT id(field32) = id(field33)
RETURN 
id(b_fields_0_field11) AS b_fields_0_field11, id(b_fields_1_field12) AS b_fields_1_field12, id(b_fields_2_field13) AS b_fields_2_field13,
id(b_fields_3_field21) AS b_fields_3_field21, id(b_fields_4_field22) AS b_fields_4_field22, id(b_fields_5_field23) AS b_fields_5_field23,
id(b_fields_6_field31) AS b_fields_6_field31, id(b_fields_7_field32) AS b_fields_7_field32, id(b_fields_8_field33) AS b_fields_8_field33,
id(field11_right_0_field12) AS field11_right_0_field12, id(field11_bottom_1_field21) AS field11_bottom_1_field21, id(field12_right_0_field13) AS field12_right_0_field13,
id(field12_bottom_1_field22) AS field12_bottom_1_field22, id(field13_bottom_0_field23) AS field13_bottom_0_field23, id(field21_right_0_field22) AS field21_right_0_field22, 
id(field21_bottom_1_field31) AS field21_bottom_1_field31, id(field22_right_0_field23) AS field22_right_0_field23, id(field22_bottom_1_field32) AS field22_bottom_1_field32,
id(field23_bottom_0_field33) AS field23_bottom_0_field33, id(field31_right_0_field32) AS field31_right_0_field32, id(field32_right_0_field33) AS field32_right_0_field33, id(field33) AS field33
 LIMIT 1
</code></pre></div>
<p dir="auto">The query returns all 3x3 size sub boards. Hence the expected result in a 4x4 board is 4. Using the LIMIT opertor at the end, we limit the return to 1 sub board, such that the expected result size is 1. But sometimes the database returns no matches. Same behavior when using LIMIT 1, LIMIT 2 or LIMIT 3. Using LIMIT 4 the database return the 4 matches.</p>
<p dir="auto">Neo4j version: 3.5.8 community<br>
Operating system: Debian 9<br>
API/Driver: Neo4j desktop</p>
<p dir="auto">Steps to reproduce<br>
Create 1 fulltext index with duplicate labels :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CALL db.index.fulltext.createNodeIndex(
                    &quot;SysDesignationIndex2&quot;,
                    ['toto','tata','toto'],
                    [&quot;sys_designation1&quot;],
                    { analyzer: &quot;french&quot;, eventually_consistent: &quot;true&quot; }
                )"><pre class="notranslate"><code class="notranslate">CALL db.index.fulltext.createNodeIndex(
                    "SysDesignationIndex2",
                    ['toto','tata','toto'],
                    ["sys_designation1"],
                    { analyzer: "french", eventually_consistent: "true" }
                )
</code></pre></div>
<p dir="auto">Expected behavior<br>
The index is created, and I can drop it without a problem</p>
<p dir="auto">Actual behavior<br>
The index is created, but I can't remove it.</p>
<p dir="auto">I get this message when I try to drop it :<br>
<code class="notranslate">call db.index.fulltext.drop('SysDesignationIndex2')</code></p>
<p dir="auto"><code class="notranslate">Neo.DatabaseError.Transaction.TransactionCommitFailed: Could not apply the transaction to the store after written to log</code></p>
<p dir="auto">And into the log I get :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2019-09-05 14:57:31.281+0000 ERROR [o.n.b.v.r.ErrorReporter] Client triggered an unexpected error [Neo.DatabaseError.Transaction.TransactionStartFailed]: The database has encountered a critical error, and needs to be restarted. Please see database logs for more details., reference 61c1e5d7-0d12-4602-8283-a20cd7804c28. The database has encountered a critical error, and needs to be restarted. Please see database logs for more details.
org.neo4j.graphdb.TransactionFailureException: The database has encountered a critical error, and needs to be restarted. Please see database logs for more details.
    at org.neo4j.graphdb.facade.spi.ClassicCoreSPI.beginTransaction(ClassicCoreSPI.java:193)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransactionInternal(GraphDatabaseFacade.java:691)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransaction(GraphDatabaseFacade.java:375)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachineV1SPI.beginTransaction(TransactionStateMachineV1SPI.java:139)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachineV1SPI.beginTransaction(TransactionStateMachineV1SPI.java:98)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State$1.execute(TransactionStateMachine.java:293)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State$1.run(TransactionStateMachine.java:269)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine.run(TransactionStateMachine.java:110)
    at org.neo4j.bolt.v3.runtime.ReadyState.processRunMessage(ReadyState.java:85)
    at org.neo4j.bolt.v3.runtime.ReadyState.processUnsafe(ReadyState.java:56)
    at org.neo4j.bolt.v3.runtime.FailSafeBoltStateMachineState.process(FailSafeBoltStateMachineState.java:48)
    at org.neo4j.bolt.v1.runtime.BoltStateMachineV1.nextState(BoltStateMachineV1.java:144)
    at org.neo4j.bolt.v1.runtime.BoltStateMachineV1.process(BoltStateMachineV1.java:92)
    at org.neo4j.bolt.messaging.BoltRequestMessageReader.lambda$doRead$1(BoltRequestMessageReader.java:89)
    at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:191)
    at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:139)
    at org.neo4j.bolt.runtime.ExecutorBoltScheduler.executeBatch(ExecutorBoltScheduler.java:171)
    at org.neo4j.bolt.runtime.ExecutorBoltScheduler.lambda$scheduleBatchOrHandleError$2(ExecutorBoltScheduler.java:154)
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.neo4j.internal.kernel.api.exceptions.TransactionFailureException: The database has encountered a critical error, and needs to be restarted. Please see database logs for more details.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.neo4j.kernel.internal.DatabaseHealth.assertHealthy(DatabaseHealth.java:61)
    at org.neo4j.kernel.impl.api.KernelImpl.beginTransaction(KernelImpl.java:88)
    at org.neo4j.graphdb.facade.spi.ClassicCoreSPI.beginTransaction(ClassicCoreSPI.java:186)
    ... 21 more
Caused by: org.neo4j.kernel.api.exceptions.TransactionApplyKernelException: Failed to apply transaction: Transaction #340 at log position LogPosition{logVersion=0, byteOffset=20807} {started 2019-09-05 14:57:24.896+0000, committed 2019-09-05 14:57:24.905+0000, with 1 commands in this transaction, authored by -1, with master id -1, lock session 138, latest committed transaction id when started was 339, additional header bytes:
15
DA
21
68
9A
33
E2
23}
    at org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine.apply(RecordStorageEngine.java:301)
    at org.neo4j.kernel.impl.api.TransactionRepresentationCommitProcess.applyToStore(TransactionRepresentationCommitProcess.java:78)
    at org.neo4j.kernel.impl.api.TransactionRepresentationCommitProcess.commit(TransactionRepresentationCommitProcess.java:51)
    at org.neo4j.kernel.impl.api.KernelTransactionImplementation.commit(KernelTransactionImplementation.java:716)
    at org.neo4j.kernel.impl.api.KernelTransactionImplementation.closeTransaction(KernelTransactionImplementation.java:586)
    at org.neo4j.internal.kernel.api.Transaction.close(Transaction.java:178)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State.closeTransaction(TransactionStateMachine.java:469)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State$1.streamResult(TransactionStateMachine.java:329)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine.streamResult(TransactionStateMachine.java:128)
    at org.neo4j.bolt.v3.runtime.StreamingState.processStreamResultMessage(StreamingState.java:40)
    at org.neo4j.bolt.v3.runtime.AbstractStreamingState.processUnsafe(AbstractStreamingState.java:44)
    ... 12 more
Caused by: java.lang.NullPointerException
    at org.neo4j.kernel.impl.api.store.SchemaCache$SchemaCacheState.removeSchemaRule(SchemaCache.java:372)
    at org.neo4j.kernel.impl.api.store.SchemaCache.removeSchemaRule(SchemaCache.java:164)
    at org.neo4j.kernel.impl.cache.BridgingCacheAccess.removeSchemaRuleFromCache(BridgingCacheAccess.java:51)
    at org.neo4j.kernel.impl.transaction.command.NeoStoreTransactionApplier.visitSchemaRuleCommand(NeoStoreTransactionApplier.java:183)
    at org.neo4j.kernel.impl.transaction.command.Command$SchemaRuleCommand.handle(Command.java:647)
    at org.neo4j.kernel.impl.api.TransactionApplierFacade.visit(TransactionApplierFacade.java:61)
    at org.neo4j.kernel.impl.api.TransactionApplierFacade.visit(TransactionApplierFacade.java:35)
    at org.neo4j.kernel.impl.transaction.log.PhysicalTransactionRepresentation.accept(PhysicalTransactionRepresentation.java:70)
    at org.neo4j.kernel.impl.api.TransactionToApply.accept(TransactionToApply.java:130)
    at org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine.apply(RecordStorageEngine.java:294)
    ... 22 more"><pre class="notranslate"><code class="notranslate">2019-09-05 14:57:31.281+0000 ERROR [o.n.b.v.r.ErrorReporter] Client triggered an unexpected error [Neo.DatabaseError.Transaction.TransactionStartFailed]: The database has encountered a critical error, and needs to be restarted. Please see database logs for more details., reference 61c1e5d7-0d12-4602-8283-a20cd7804c28. The database has encountered a critical error, and needs to be restarted. Please see database logs for more details.
org.neo4j.graphdb.TransactionFailureException: The database has encountered a critical error, and needs to be restarted. Please see database logs for more details.
    at org.neo4j.graphdb.facade.spi.ClassicCoreSPI.beginTransaction(ClassicCoreSPI.java:193)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransactionInternal(GraphDatabaseFacade.java:691)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransaction(GraphDatabaseFacade.java:375)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachineV1SPI.beginTransaction(TransactionStateMachineV1SPI.java:139)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachineV1SPI.beginTransaction(TransactionStateMachineV1SPI.java:98)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State$1.execute(TransactionStateMachine.java:293)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State$1.run(TransactionStateMachine.java:269)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine.run(TransactionStateMachine.java:110)
    at org.neo4j.bolt.v3.runtime.ReadyState.processRunMessage(ReadyState.java:85)
    at org.neo4j.bolt.v3.runtime.ReadyState.processUnsafe(ReadyState.java:56)
    at org.neo4j.bolt.v3.runtime.FailSafeBoltStateMachineState.process(FailSafeBoltStateMachineState.java:48)
    at org.neo4j.bolt.v1.runtime.BoltStateMachineV1.nextState(BoltStateMachineV1.java:144)
    at org.neo4j.bolt.v1.runtime.BoltStateMachineV1.process(BoltStateMachineV1.java:92)
    at org.neo4j.bolt.messaging.BoltRequestMessageReader.lambda$doRead$1(BoltRequestMessageReader.java:89)
    at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:191)
    at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:139)
    at org.neo4j.bolt.runtime.ExecutorBoltScheduler.executeBatch(ExecutorBoltScheduler.java:171)
    at org.neo4j.bolt.runtime.ExecutorBoltScheduler.lambda$scheduleBatchOrHandleError$2(ExecutorBoltScheduler.java:154)
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.neo4j.internal.kernel.api.exceptions.TransactionFailureException: The database has encountered a critical error, and needs to be restarted. Please see database logs for more details.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.neo4j.kernel.internal.DatabaseHealth.assertHealthy(DatabaseHealth.java:61)
    at org.neo4j.kernel.impl.api.KernelImpl.beginTransaction(KernelImpl.java:88)
    at org.neo4j.graphdb.facade.spi.ClassicCoreSPI.beginTransaction(ClassicCoreSPI.java:186)
    ... 21 more
Caused by: org.neo4j.kernel.api.exceptions.TransactionApplyKernelException: Failed to apply transaction: Transaction #340 at log position LogPosition{logVersion=0, byteOffset=20807} {started 2019-09-05 14:57:24.896+0000, committed 2019-09-05 14:57:24.905+0000, with 1 commands in this transaction, authored by -1, with master id -1, lock session 138, latest committed transaction id when started was 339, additional header bytes:
15
DA
21
68
9A
33
E2
23}
    at org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine.apply(RecordStorageEngine.java:301)
    at org.neo4j.kernel.impl.api.TransactionRepresentationCommitProcess.applyToStore(TransactionRepresentationCommitProcess.java:78)
    at org.neo4j.kernel.impl.api.TransactionRepresentationCommitProcess.commit(TransactionRepresentationCommitProcess.java:51)
    at org.neo4j.kernel.impl.api.KernelTransactionImplementation.commit(KernelTransactionImplementation.java:716)
    at org.neo4j.kernel.impl.api.KernelTransactionImplementation.closeTransaction(KernelTransactionImplementation.java:586)
    at org.neo4j.internal.kernel.api.Transaction.close(Transaction.java:178)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State.closeTransaction(TransactionStateMachine.java:469)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine$State$1.streamResult(TransactionStateMachine.java:329)
    at org.neo4j.bolt.v1.runtime.TransactionStateMachine.streamResult(TransactionStateMachine.java:128)
    at org.neo4j.bolt.v3.runtime.StreamingState.processStreamResultMessage(StreamingState.java:40)
    at org.neo4j.bolt.v3.runtime.AbstractStreamingState.processUnsafe(AbstractStreamingState.java:44)
    ... 12 more
Caused by: java.lang.NullPointerException
    at org.neo4j.kernel.impl.api.store.SchemaCache$SchemaCacheState.removeSchemaRule(SchemaCache.java:372)
    at org.neo4j.kernel.impl.api.store.SchemaCache.removeSchemaRule(SchemaCache.java:164)
    at org.neo4j.kernel.impl.cache.BridgingCacheAccess.removeSchemaRuleFromCache(BridgingCacheAccess.java:51)
    at org.neo4j.kernel.impl.transaction.command.NeoStoreTransactionApplier.visitSchemaRuleCommand(NeoStoreTransactionApplier.java:183)
    at org.neo4j.kernel.impl.transaction.command.Command$SchemaRuleCommand.handle(Command.java:647)
    at org.neo4j.kernel.impl.api.TransactionApplierFacade.visit(TransactionApplierFacade.java:61)
    at org.neo4j.kernel.impl.api.TransactionApplierFacade.visit(TransactionApplierFacade.java:35)
    at org.neo4j.kernel.impl.transaction.log.PhysicalTransactionRepresentation.accept(PhysicalTransactionRepresentation.java:70)
    at org.neo4j.kernel.impl.api.TransactionToApply.accept(TransactionToApply.java:130)
    at org.neo4j.kernel.impl.storageengine.impl.recordstorage.RecordStorageEngine.apply(RecordStorageEngine.java:294)
    ... 22 more
</code></pre></div>
<p dir="auto">And when I try to query the database I get :<br>
<code class="notranslate">call db.indexes()</code></p>
<p dir="auto"><code class="notranslate">Neo.DatabaseError.Transaction.TransactionStartFailed: The database has encountered a critical error, and needs to be restarted. Please see database logs for more details.</code></p>
<p dir="auto">We know it makes no sense to have duplicate labels into an index, but it can happen does something wrong.</p>
<p dir="auto">To avoid this issue, We have added checks into the code to prevent this.</p>
<p dir="auto">best regards</p>