File tree Expand file tree Collapse file tree
java-spanner/google-cloud-spanner/src/main/java/com/google/cloud/spanner Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -527,8 +527,28 @@ public void run() {
527527 return ;
528528 }
529529 if (!proto .hasCommitTimestamp ()) {
530+ if (proto .hasPrecommitToken () && retryAttemptDueToCommitProtocolExtension ) {
531+ txnLogger .log (
532+ Level .FINE ,
533+ "Missing commitTimestamp, response has precommit token "
534+ + "and client has already attempted commit retry" );
535+ span .addAnnotation (
536+ "Missing commitTimestamp, response has precommit token "
537+ + "and client has already attempted commit retry" );
538+ } else if (!proto .hasPrecommitToken ()) {
539+ txnLogger .log (
540+ Level .FINE , "Missing commitTimestamp, response has no precommit token" );
541+ span .addAnnotation (
542+ "Missing commitTimestamp, " + "response has no precommit token" );
543+ }
530544 throw newSpannerException (
531- ErrorCode .INTERNAL , "Missing commitTimestamp:\n " + session .getName ());
545+ ErrorCode .INTERNAL ,
546+ "Missing commitTimestamp:\n "
547+ + session .getName ()
548+ + "\n Has precommit token: "
549+ + proto .hasPrecommitToken ()
550+ + "\n Already attempted commit retry: "
551+ + retryAttemptDueToCommitProtocolExtension );
532552 }
533553 span .addAnnotation ("Commit Done" );
534554 opSpan .end ();
You can’t perform that action at this time.
0 commit comments