CARVIEW |
Select Language
HTTP/2 200
date: Thu, 31 Jul 2025 01:46:45 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/neo4j/neo4j-java-driver.git
etag: W/"52ac3aadc77d69017a437493107c9d2d"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=MoLwbZLqaXcoNT8lKsF%2BalxvEZhVIcM9vPiqpzGRKrXr1N1SHZG5pms%2F73mypDbN2fmbkGnDJO0IGl%2Fs3E9ZwT6VpifLfXJ%2Fhokh9xe6fCR40Y%2FBKevCHgHyjcq0AcfQBaS7GoA1NPjnuKuvaVnUnoTNw8HiNDXWsrE1SyK%2FOdbvhwzi0tlMTf3jv1oyznK8DLqMUA1Bm9L0hpxNf%2FThOnzY6U%2Fh3S%2F9Q4QGOZO2KCWqFHsGAfe6xWDxU9crWQ%2F1CAme0gAP5FoLtJTtOmUBqA%3D%3D--6OkYN3Gvhf%2FUIVjF--52WwC61yy9qOV9Mx8JbjTg%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.447982830.1753926404; Path=/; Domain=github.com; Expires=Fri, 31 Jul 2026 01:46:44 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 31 Jul 2026 01:46:44 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 93EA:1CD35:13F303:1E3FF5:688ACB04
Don’t swallow the cause of a TX termination. (#731) (#737) · neo4j/neo4j-java-driver@233e0e4 · GitHub
Copy file name to clipboardExpand all lines: driver/src/main/java/org/neo4j/driver/internal/async/InternalAsyncTransaction.java
Copy file name to clipboardExpand all lines: driver/src/main/java/org/neo4j/driver/internal/async/NetworkSession.java
Copy file name to clipboardExpand all lines: driver/src/main/java/org/neo4j/driver/internal/async/UnmanagedTransaction.java
Copy file name to clipboardExpand all lines: driver/src/main/java/org/neo4j/driver/internal/handlers/TransactionPullResponseCompletionListener.java
Copy file name to clipboardExpand all lines: driver/src/main/java/org/neo4j/driver/internal/reactive/InternalRxTransaction.java
Copy file name to clipboardExpand all lines: driver/src/main/java/org/neo4j/driver/internal/retry/ExponentialBackoffRetryLogic.java
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 156
Commit 233e0e4
* Don’t swallow the cause of a TX termination.
There are a couple of scenarions in which a transaction gets terminated. The cause will be propagated by the pull handler and the transaction will be marked accordingly. There might be a chance that a degration from a leader to a follower on the server side happens in between to calls to a run method on that transaction: The transaction is still open, but cannot run queries any longer. Outside a transactional function this leads correctly to a ClientException. Inside a transactional function, this must not happen.
The retry logic must be able to find the cause of the termination and if there’s any, it should judge on the cause if it retries or not.
This PR changes the following:
- Add a StateHolder to the UnmangedTransaction
- The holder is necessary to keep the single field volatie
- The holder holds the state and a possible cause of termination
- The holder is able to determine whether a session is still open or not.
- It removes markTerminated from InternalAsyncTransaction as it was used only for tests.
* Polishing.
This removes the circular dependency between holder and state. I had introduced it cause I wanted to avoid object allocation. This solution here is better: It also creates only 3 different holders for non terminated states, but without the circular dependency.
Co-authored-by: Gregory Woods <gregory.woods@neo4j.com>
Co-authored-by: Michael Simons <michael.simons@neo4j.com>
1 parent b4ee589 commit 233e0e4Copy full SHA for 233e0e4
File tree
Expand file treeCollapse file tree
17 files changed
+514
-116
lines changedFilter options
- driver/src
- main/java/org/neo4j/driver/internal
- async
- handlers
- reactive
- retry
- test
- java/org/neo4j/driver
- integration
- internal
- async
- handlers
- pulln
- reactive
- retry
- resources
Expand file treeCollapse file tree
17 files changed
+514
-116
lines changeddriver/src/main/java/org/neo4j/driver/internal/async/InternalAsyncTransaction.java
Copy file name to clipboardExpand all lines: driver/src/main/java/org/neo4j/driver/internal/async/InternalAsyncTransaction.java-5Lines changed: 0 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
53 |
| - | |
54 |
| - | |
55 |
| - | |
56 |
| - | |
57 |
| - | |
58 | 53 |
| |
59 | 54 |
| |
60 | 55 |
| |
|
driver/src/main/java/org/neo4j/driver/internal/async/NetworkSession.java
Copy file name to clipboardExpand all lines: driver/src/main/java/org/neo4j/driver/internal/async/NetworkSession.java+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
138 | 138 |
| |
139 | 139 |
| |
140 | 140 |
| |
141 |
| - | |
| 141 | + | |
142 | 142 |
| |
143 | 143 |
| |
144 | 144 |
| |
|
driver/src/main/java/org/neo4j/driver/internal/async/UnmanagedTransaction.java
Copy file name to clipboardExpand all lines: driver/src/main/java/org/neo4j/driver/internal/async/UnmanagedTransaction.java+71-17Lines changed: 71 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
21 | 22 |
| |
22 | 23 |
| |
23 | 24 |
| |
| |||
58 | 59 |
| |
59 | 60 |
| |
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 | + | |
61 | 115 |
| |
62 | 116 |
| |
63 | 117 |
| |
64 | 118 |
| |
65 | 119 |
| |
66 | 120 |
| |
67 |
| - | |
| 121 | + | |
68 | 122 |
| |
69 | 123 |
| |
70 | 124 |
| |
| |||
104 | 158 |
| |
105 | 159 |
| |
106 | 160 |
| |
107 |
| - | |
| 161 | + | |
108 | 162 |
| |
109 | 163 |
| |
110 | 164 |
| |
111 |
| - | |
| 165 | + | |
112 | 166 |
| |
113 | 167 |
| |
114 | 168 |
| |
| |||
122 | 176 |
| |
123 | 177 |
| |
124 | 178 |
| |
125 |
| - | |
| 179 | + | |
126 | 180 |
| |
127 | 181 |
| |
128 | 182 |
| |
129 |
| - | |
| 183 | + | |
130 | 184 |
| |
131 | 185 |
| |
132 | 186 |
| |
| |||
158 | 212 |
| |
159 | 213 |
| |
160 | 214 |
| |
161 |
| - | |
| 215 | + | |
162 | 216 |
| |
163 | 217 |
| |
164 |
| - | |
| 218 | + | |
165 | 219 |
| |
166 |
| - | |
| 220 | + | |
167 | 221 |
| |
168 | 222 |
| |
169 | 223 |
| |
| |||
173 | 227 |
| |
174 | 228 |
| |
175 | 229 |
| |
176 |
| - | |
| 230 | + | |
177 | 231 |
| |
178 | 232 |
| |
179 | 233 |
| |
180 |
| - | |
| 234 | + | |
181 | 235 |
| |
182 | 236 |
| |
183 | 237 |
| |
184 |
| - | |
| 238 | + | |
185 | 239 |
| |
186 | 240 |
| |
187 |
| - | |
| 241 | + | |
188 | 242 |
| |
189 | 243 |
| |
190 | 244 |
| |
191 | 245 |
| |
192 | 246 |
| |
193 |
| - | |
| 247 | + | |
194 | 248 |
| |
195 | 249 |
| |
196 |
| - | |
| 250 | + | |
197 | 251 |
| |
198 | 252 |
| |
199 | 253 |
| |
200 | 254 |
| |
201 | 255 |
| |
202 | 256 |
| |
203 |
| - | |
| 257 | + | |
204 | 258 |
| |
205 | 259 |
| |
206 | 260 |
| |
| |||
224 | 278 |
| |
225 | 279 |
| |
226 | 280 |
| |
227 |
| - | |
| 281 | + | |
228 | 282 |
| |
229 | 283 |
| |
230 | 284 |
| |
231 |
| - | |
| 285 | + | |
232 | 286 |
| |
233 | 287 |
| |
234 | 288 |
| |
|
driver/src/main/java/org/neo4j/driver/internal/handlers/TransactionPullResponseCompletionListener.java
Copy file name to clipboardExpand all lines: driver/src/main/java/org/neo4j/driver/internal/handlers/TransactionPullResponseCompletionListener.java+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
48 |
| - | |
| 48 | + | |
49 | 49 |
| |
50 | 50 |
|
driver/src/main/java/org/neo4j/driver/internal/reactive/InternalRxTransaction.java
Copy file name to clipboardExpand all lines: driver/src/main/java/org/neo4j/driver/internal/reactive/InternalRxTransaction.java+1-1Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
59 |
| - | |
| 59 | + | |
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
|
driver/src/main/java/org/neo4j/driver/internal/retry/ExponentialBackoffRetryLogic.java
Copy file name to clipboardExpand all lines: driver/src/main/java/org/neo4j/driver/internal/retry/ExponentialBackoffRetryLogic.java+57-39Lines changed: 57 additions & 39 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
| 42 | + | |
42 | 43 |
| |
43 | 44 |
| |
44 | 45 |
| |
| |||
100 | 101 |
| |
101 | 102 |
| |
102 | 103 |
| |
103 |
| - | |
| 104 | + | |
104 | 105 |
| |
| 106 | + | |
105 | 107 |
| |
106 | 108 |
| |
107 | 109 |
| |
| |||
122 | 124 |
| |
123 | 125 |
| |
124 | 126 |
| |
125 |
| - | |
126 |
| - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
127 | 131 |
| |
128 | 132 |
| |
129 | 133 |
| |
| |||
144 | 148 |
| |
145 | 149 |
| |
146 | 150 |
| |
147 |
| - | |
148 |
| - | |
149 |
| - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
150 | 169 |
| |
151 | 170 |
| |
152 | 171 |
| |
153 | 172 |
| |
154 |
| - | |
155 |
| - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
156 | 179 |
| |
157 | 180 |
| |
158 | 181 |
| |
159 | 182 |
| |
160 |
| - | |
| 183 | + | |
161 | 184 |
| |
162 | 185 |
| |
163 |
| - | |
| 186 | + | |
164 | 187 |
| |
165 |
| - | |
166 |
| - | |
167 |
| - | |
168 |
| - | |
169 |
| - | |
170 |
| - | |
171 |
| - | |
172 |
| - | |
173 |
| - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
174 | 193 |
| |
175 |
| - | |
176 |
| - | |
177 |
| - | |
178 |
| - | |
179 |
| - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
180 | 199 |
| |
181 |
| - | |
182 |
| - | |
| 200 | + | |
| 201 | + | |
183 | 202 |
| |
184 |
| - | |
185 |
| - | |
186 |
| - | |
187 |
| - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
188 | 208 |
| |
189 |
| - | |
190 |
| - | |
191 |
| - | |
| 209 | + | |
192 | 210 |
| |
193 |
| - | |
194 |
| - | |
| 211 | + | |
195 | 212 |
| |
196 | 213 |
| |
197 | 214 |
| |
| |||
249 | 266 |
| |
250 | 267 |
| |
251 | 268 |
| |
252 |
| - | |
253 |
| - | |
| 269 | + | |
| 270 | + | |
254 | 271 |
| |
| 272 | + | |
255 | 273 |
| |
256 | 274 |
| |
257 | 275 |
| |
| |||
269 | 287 |
| |
270 | 288 |
| |
271 | 289 |
| |
272 |
| - | |
273 |
| - | |
| 290 | + | |
| 291 | + | |
274 | 292 |
| |
275 | 293 |
| |
276 | 294 |
| |
|
You can’t perform that action at this time.
0 commit comments