René's URL Explorer Experiment


Title: Spanner: TransactionRunner.run() sometimes doesn't retry on ABORTED · Issue #4939 · googleapis/google-cloud-java · GitHub

Open Graph Title: Spanner: TransactionRunner.run() sometimes doesn't retry on ABORTED · Issue #4939 · googleapis/google-cloud-java

X Title: Spanner: TransactionRunner.run() sometimes doesn't retry on ABORTED · Issue #4939 · googleapis/google-cloud-java

Description: Hello, we've noticed that sometimes running executeUpdate throws an AbortedException (directly from inside executeUpdate). This happens, for example, when running queries like DELETE FROM Table WHERE true. When this happens inside Transa...

Open Graph Description: Hello, we've noticed that sometimes running executeUpdate throws an AbortedException (directly from inside executeUpdate). This happens, for example, when running queries like DELETE FROM Table WHE...

X Description: Hello, we've noticed that sometimes running executeUpdate throws an AbortedException (directly from inside executeUpdate). This happens, for example, when running queries like DELETE FROM Table...

Opengraph URL: https://github.com/googleapis/google-cloud-java/issues/4939

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Spanner: TransactionRunner.run() sometimes doesn't retry on ABORTED","articleBody":"Hello, we've noticed that sometimes running executeUpdate throws an AbortedException (directly from inside executeUpdate). This happens, for example, when running queries like `DELETE FROM Table WHERE true`. When this happens inside TransactionRunner.run(), the transaction is not automatically retried, but the AbortedException is immediately rethrown to the caller. Note that the AbortedException appears to be thrown from `executeUpdate`, not transaction.commit().\r\n\r\nThe message in the exception says something like:\r\n\r\n```\r\ncom.google.cloud.spanner.AbortedException: ABORTED: com.google.api.gax.rpc.AbortedException: io.grpc.StatusRuntimeException: ABORTED: Transaction aborted. Database schema probably changed during transaction, retry may succeed.\r\n```\r\n\r\nWe've found that if we wrap this in a retry loop, it does in fact succeed as suggested. We're wondering whether this is a case that should be handled by TransactionRunner's retry logic, or whether there's something we should be doing differently in our code. Thanks!\r\n\r\n#### Environment details\r\n\r\n2. OS type and version: OSX High Sierra.\r\n3. Java version: 1.8.0\r\n4. google-cloud-java version(s): google-cloud-spanner v0.70.0\r\n\r\n#### Code example\r\n\r\n```java\r\n// we are primarily seeing this while using RemoteSpannerHelper\r\nfinal RemoteSpannerHelper remoteSpannerHelper = RemoteSpannerHelper.create();\r\nfinal Database db = remoteSpannerHelper.createTestDatabase(DDL);\r\nfinal DatabaseClient dbClient = remoteSpannerHelper.getDatabaseClient(db);\r\n\r\nwhile (true) {\r\n  dbClient.readWriteTransaction().run(tx -\u003e {\r\n    // this sometimes throws AbortedException\r\n    tx.executeUpdate(Statement.of(\"DELETE FROM Table WHERE true\"));\r\n  });\r\n}\r\n```\r\n\r\n#### Stack trace\r\n```\r\ncom.google.cloud.spanner.AbortedException: ABORTED: com.google.api.gax.rpc.AbortedException: io.grpc.StatusRuntimeException: ABORTED: Transaction aborted. Database schema probably changed during transaction, retry may succeed.\r\nretry_delay {\r\n  nanos: 10997310\r\n}\r\n\r\n\tat com.google.cloud.spanner.SpannerExceptionFactory.newSpannerExceptionPreformatted(SpannerExceptionFactory.java:117)\r\n\tat com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:43)\r\n\tat com.google.cloud.spanner.SpannerExceptionFactory.newSpannerException(SpannerExceptionFactory.java:80)\r\n\tat com.google.cloud.spanner.spi.v1.GapicSpannerRpc.get(GapicSpannerRpc.java:526)\r\n\tat com.google.cloud.spanner.spi.v1.GapicSpannerRpc.executeQuery(GapicSpannerRpc.java:456)\r\n\tat com.google.cloud.spanner.SpannerImpl$TransactionContextImpl$2.call(SpannerImpl.java:1643)\r\n\tat com.google.cloud.spanner.SpannerImpl$TransactionContextImpl$2.call(SpannerImpl.java:1640)\r\n\tat com.google.cloud.spanner.SpannerImpl.runWithRetries(SpannerImpl.java:246)\r\n\tat com.google.cloud.spanner.SpannerImpl$TransactionContextImpl.executeUpdate(SpannerImpl.java:1639)\r\n\t(one line from our closure, that calls executeUpdate)\r\n\tat com.google.cloud.spanner.SpannerImpl$TransactionRunnerImpl.runInternal(SpannerImpl.java:1312)\r\n\tat com.google.cloud.spanner.SpannerImpl$TransactionRunnerImpl.run(SpannerImpl.java:1280)\r\n\tat com.google.cloud.spanner.SessionPool$PooledSession$1.run(SessionPool.java:410)\r\n```","author":{"url":"https://github.com/fyhuang-rideos","@type":"Person","name":"fyhuang-rideos"},"datePublished":"2019-04-11T18:53:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/4939/google-cloud-java/issues/4939"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d20eee57-222b-fad4-1b3d-75424b16fb19
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBC5A:B2172:198D716:24AFE3B:6A4CDA8F
html-safe-nonceddff083277fa4078aea16cc69616efc869521cb4645d8e00c43a044b01f81b51
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzVBOkIyMTcyOjE5OEQ3MTY6MjRBRkUzQjo2QTRDREE4RiIsInZpc2l0b3JfaWQiOiI4NDYwOTI3OTE1MjQzOTIwMDE1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac6d423b88645d49356cc83b1bdb7bc3a8e21188e80f5565e0c00dd0081c2baf1e
hovercard-subject-tagissue:432190606
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-java/4939/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d9293f6543df1819ce87943b4cb764067924afc0aa775c9a747a7c652a0d7ad5/googleapis/google-cloud-java/issues/4939
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d9293f6543df1819ce87943b4cb764067924afc0aa775c9a747a7c652a0d7ad5/googleapis/google-cloud-java/issues/4939
og:image:altHello, we've noticed that sometimes running executeUpdate throws an AbortedException (directly from inside executeUpdate). This happens, for example, when running queries like DELETE FROM Table WHE...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamefyhuang-rideos
hostnamegithub.com
expected-hostnamegithub.com
None299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8
turbo-cache-controlno-preview
go-importgithub.com/googleapis/google-cloud-java git https://github.com/googleapis/google-cloud-java.git
octolytics-dimension-user_id16785467
octolytics-dimension-user_logingoogleapis
octolytics-dimension-repository_id26181278
octolytics-dimension-repository_nwogoogleapis/google-cloud-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id26181278
octolytics-dimension-repository_network_root_nwogoogleapis/google-cloud-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3eeb74f55ccd8a31bdaec6839577c592bbf7844c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/googleapis/google-cloud-java/issues/4939#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fgoogle-cloud-java%2Fissues%2F4939
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fgoogle-cloud-java%2Fissues%2F4939
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=googleapis%2Fgoogle-cloud-java
Reloadhttps://github.com/googleapis/google-cloud-java/issues/4939
Reloadhttps://github.com/googleapis/google-cloud-java/issues/4939
Reloadhttps://github.com/googleapis/google-cloud-java/issues/4939
Please reload this pagehttps://github.com/googleapis/google-cloud-java/issues/4939
googleapis https://github.com/googleapis
google-cloud-javahttps://github.com/googleapis/google-cloud-java
Notifications https://github.com/login?return_to=%2Fgoogleapis%2Fgoogle-cloud-java
Fork 1.1k https://github.com/login?return_to=%2Fgoogleapis%2Fgoogle-cloud-java
Star 2.1k https://github.com/login?return_to=%2Fgoogleapis%2Fgoogle-cloud-java
Code https://github.com/googleapis/google-cloud-java
Issues 651 https://github.com/googleapis/google-cloud-java/issues
Pull requests 104 https://github.com/googleapis/google-cloud-java/pulls
Actions https://github.com/googleapis/google-cloud-java/actions
Security and quality 0 https://github.com/googleapis/google-cloud-java/security
Insights https://github.com/googleapis/google-cloud-java/pulse
Code https://github.com/googleapis/google-cloud-java
Issues https://github.com/googleapis/google-cloud-java/issues
Pull requests https://github.com/googleapis/google-cloud-java/pulls
Actions https://github.com/googleapis/google-cloud-java/actions
Security and quality https://github.com/googleapis/google-cloud-java/security
Insights https://github.com/googleapis/google-cloud-java/pulse
Spanner: TransactionRunner.run() sometimes doesn't retry on ABORTEDhttps://github.com/googleapis/google-cloud-java/issues/4939#top
https://github.com/olavloite
api: spannerIssues related to the Spanner API.https://github.com/googleapis/google-cloud-java/issues?q=state%3Aopen%20label%3A%22api%3A%20spanner%22
type: questionRequest for information or clarification. Not an issue.https://github.com/googleapis/google-cloud-java/issues?q=state%3Aopen%20label%3A%22type%3A%20question%22
https://github.com/fyhuang-rideos
fyhuang-rideoshttps://github.com/fyhuang-rideos
on Apr 11, 2019https://github.com/googleapis/google-cloud-java/issues/4939#issue-432190606
olavloitehttps://github.com/olavloite
api: spannerIssues related to the Spanner API.https://github.com/googleapis/google-cloud-java/issues?q=state%3Aopen%20label%3A%22api%3A%20spanner%22
type: questionRequest for information or clarification. Not an issue.https://github.com/googleapis/google-cloud-java/issues?q=state%3Aopen%20label%3A%22type%3A%20question%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.