From 5ca3707acc3264148039651d389c4c734d2ac3d2 Mon Sep 17 00:00:00 2001 From: Love Kristofer Leifland Date: Wed, 19 Apr 2023 14:55:38 +0200 Subject: [PATCH 1/5] Merge pull request #119 from loveleif/cypher-lost-updates Clarify documentation around lost Cypher updates --- modules/ROOT/pages/transaction-management.adoc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/ROOT/pages/transaction-management.adoc b/modules/ROOT/pages/transaction-management.adoc index a0183bf..35a497a 100644 --- a/modules/ROOT/pages/transaction-management.adoc +++ b/modules/ROOT/pages/transaction-management.adoc @@ -82,9 +82,7 @@ Due to the limitations of the _read-committed isolation level_, the increments m If there is a direct dependency, Cypher automatically acquires a write lock before reading. A direct dependency is when the right-hand side of `SET` has a dependent property read in the expression or the value of a key-value pair in a literal map. -For example, if you run the following query by one hundred concurrent clients, it is very likely not to increment the property `n.prop` to 100, unless a write lock is acquired before reading the property value. -This is because all queries read the value of `n.prop` within their own transaction, and cannot see the incremented value from any other transaction that has not yet been committed. -In the worst case scenario, the final value would be as low as 1 if all threads perform the read before any has committed their transaction. +For example, if you run one of the following queries by one hundred concurrent clients, it will increment the property `n.prop` to 100 because Cypher will automatically acquire a write lock. .Cypher can acquire a write lock ==== @@ -108,7 +106,8 @@ SET n += {prop: n.prop + 1} ---- ==== -Due to the complexity of determining such a dependency in the general case, Cypher does not cover any of the following example cases: +Due to the complexity of determining such a dependency in the general case, Cypher does not cover all cases. +If you run one of the following queries concurrently 100 times, the final value of `n.prop` will most probably be less than 100. .Complex Cypher ==== From 396672c3287a1e87e24e9250592bf1ece24f982b Mon Sep 17 00:00:00 2001 From: Love Leifland Date: Tue, 18 Apr 2023 15:42:33 +0200 Subject: [PATCH 2/5] resolve conflict --- modules/ROOT/pages/transaction-management.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/ROOT/pages/transaction-management.adoc b/modules/ROOT/pages/transaction-management.adoc index 35a497a..645fd8d 100644 --- a/modules/ROOT/pages/transaction-management.adoc +++ b/modules/ROOT/pages/transaction-management.adoc @@ -106,8 +106,12 @@ SET n += {prop: n.prop + 1} ---- ==== +<<<<<<< HEAD Due to the complexity of determining such a dependency in the general case, Cypher does not cover all cases. If you run one of the following queries concurrently 100 times, the final value of `n.prop` will most probably be less than 100. +======= +Due to the complexity of determining such a dependency in the general case, Cypher does not cover all cases. If we execute one of the following queries conurrently 100 times, the final value of `n.prop` will most probably be less than 100. +>>>>>>> 36a90a5... Clarify documentation around lost Cypher updates .Complex Cypher ==== From 5eb262ae54b0ed44e80b66285dc4a68ad928acc7 Mon Sep 17 00:00:00 2001 From: Love Leifland Date: Tue, 18 Apr 2023 15:42:33 +0200 Subject: [PATCH 3/5] resolve conflict --- modules/ROOT/pages/transaction-management.adoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/ROOT/pages/transaction-management.adoc b/modules/ROOT/pages/transaction-management.adoc index 645fd8d..3031d24 100644 --- a/modules/ROOT/pages/transaction-management.adoc +++ b/modules/ROOT/pages/transaction-management.adoc @@ -106,12 +106,16 @@ SET n += {prop: n.prop + 1} ---- ==== +<<<<<<< HEAD <<<<<<< HEAD Due to the complexity of determining such a dependency in the general case, Cypher does not cover all cases. If you run one of the following queries concurrently 100 times, the final value of `n.prop` will most probably be less than 100. ======= Due to the complexity of determining such a dependency in the general case, Cypher does not cover all cases. If we execute one of the following queries conurrently 100 times, the final value of `n.prop` will most probably be less than 100. >>>>>>> 36a90a5... Clarify documentation around lost Cypher updates +======= +Due to the complexity of determining such a dependency in the general case, Cypher does not cover all cases. If we execute one of the following queries conurrently 100 times, the final value of `n.prop` will most probably be less than 100. +>>>>>>> 36a90a5... Clarify documentation around lost Cypher updates .Complex Cypher ==== From 4d861213d70fe40b7f71c905771f71982be57e20 Mon Sep 17 00:00:00 2001 From: AlexicaWright <49636617+AlexicaWright@users.noreply.github.com> Date: Tue, 16 May 2023 16:03:56 +0200 Subject: [PATCH 4/5] update version to 5.8 --- antora.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/antora.yml b/antora.yml index 60106fe..9e97c34 100644 --- a/antora.yml +++ b/antora.yml @@ -6,10 +6,10 @@ nav: - modules/ROOT/content-nav.adoc asciidoc: attributes: - neo4j-version: '5.7' - neo4j-version-exact: '5.7.0' - neo4j-buildnumber: '5.7' - java-driver-version: '5.7.0' + neo4j-version: '5.8' + neo4j-version-exact: '5.8.0' + neo4j-buildnumber: '5.8' + java-driver-version: '5.8.0' neo4j-documentation-branch: 'dev' page-origin-private: false neo4j-javadocs-base-uri: "https://neo4j.com/docs/java-reference/5/javadocs" From 2c72cfe953af7b94726aa76c40b34184b2659700 Mon Sep 17 00:00:00 2001 From: AlexicaWright <49636617+AlexicaWright@users.noreply.github.com> Date: Tue, 16 May 2023 16:09:36 +0200 Subject: [PATCH 5/5] conflicts --- modules/ROOT/pages/transaction-management.adoc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/modules/ROOT/pages/transaction-management.adoc b/modules/ROOT/pages/transaction-management.adoc index 3031d24..35a497a 100644 --- a/modules/ROOT/pages/transaction-management.adoc +++ b/modules/ROOT/pages/transaction-management.adoc @@ -106,16 +106,8 @@ SET n += {prop: n.prop + 1} ---- ==== -<<<<<<< HEAD -<<<<<<< HEAD Due to the complexity of determining such a dependency in the general case, Cypher does not cover all cases. If you run one of the following queries concurrently 100 times, the final value of `n.prop` will most probably be less than 100. -======= -Due to the complexity of determining such a dependency in the general case, Cypher does not cover all cases. If we execute one of the following queries conurrently 100 times, the final value of `n.prop` will most probably be less than 100. ->>>>>>> 36a90a5... Clarify documentation around lost Cypher updates -======= -Due to the complexity of determining such a dependency in the general case, Cypher does not cover all cases. If we execute one of the following queries conurrently 100 times, the final value of `n.prop` will most probably be less than 100. ->>>>>>> 36a90a5... Clarify documentation around lost Cypher updates .Complex Cypher ====