Skip to content

Conversation

@olavloite
Copy link

@olavloite olavloite commented Aug 27, 2019

The fireAndForgetRollbackAndCloseTxManager method could cause an IllegalArgumentException if it happened to execute after a different method had already closed the TransactionManager. The fireAndForgetRollback method has therefore been removed and replaced with a synchronous rollback call. This will make update statements in autocommit mode that return an error slightly slower than they were, as they will not return until the rollback method has been executed.

The fireAndForgetRollback method is something that should rather be added to the TransactionManager itself.

Fixes this flake: https://source.cloud.google.com/results/invocations/df3b7c34-a981-4dfa-9978-7fa34e290142/targets/cloud-devrel%2Fclient-libraries%2Fjava%2Fgoogle-cloud-java%2Fpresubmit%2Fjava7/log

The fireAndForgetRollbackAndCloseTxManager method could cause an IllegalArgumentException
if it happened to execute after a different method had already closed the
TransactionManager. The fireAndForgetRollback method has therefore been removed. This is
something that should rather be added to the TransactionManager itself.
@olavloite olavloite requested review from kolea2 and skuruppu August 27, 2019 11:06
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 27, 2019
@codecov
Copy link

codecov bot commented Aug 27, 2019

Codecov Report

Merging #6175 into master will decrease coverage by <.01%.
The diff coverage is 70%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #6175      +/-   ##
============================================
- Coverage      47.5%    47.5%   -0.01%     
+ Complexity    27447    27429      -18     
============================================
  Files          2523     2523              
  Lines        274592   274572      -20     
  Branches      31396    31396              
============================================
- Hits         130445   130422      -23     
- Misses       134514   134519       +5     
+ Partials       9633     9631       -2
Impacted Files Coverage Δ Complexity Δ
...oogle/cloud/spanner/jdbc/SingleUseTransaction.java 86.5% <70%> (-0.32%) 36 <0> (-3)
.../com/google/cloud/spanner/jdbc/ConnectionImpl.java 82.58% <0%> (-1.12%) 155% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b188bf3...a4a8fc3. Read the comment docs.

@skuruppu
Copy link

I would merge this but I'm uncertain about this Linkage Monitor failure. I don't think it's related since it's complaining about a Bigtable client gax issue.

Class com.google.api.gax.batching.BatchingDescriptor is not found
  referenced from com.google.cloud.bigtable.data.v2.stub.BigtableBatchingCallSettings (google-cloud-bigtable-0.106.1-SNAPSHOT.jar)
  referenced from com.google.cloud.bigtable.data.v2.stub.mutaterows.MutateRowsBatchingDescriptorV2 (google-cloud-bigtable-0.106.1-SNAPSHOT.jar)
Class com.google.api.gax.batching.BatchingRequestBuilder is not found
  referenced from com.google.cloud.bigtable.data.v2.stub.mutaterows.MutateRowsBatchingDescriptorV2 (google-cloud-bigtable-0.106.1-SNAPSHOT.jar)
Class com.google.api.gax.batching.BatcherImpl is not found
  referenced from com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub (google-cloud-bigtable-0.106.1-SNAPSHOT.jar)
Class com.google.api.gax.batching.BatchingCallSettings is not found
  referenced from com.google.cloud.bigtable.data.v2.stub.BigtableBatchingCallSettings (google-cloud-bigtable-0.106.1-SNAPSHOT.jar)
Class com.google.api.gax.batching.BatchingCallSettings$Builder is not found
  referenced from com.google.cloud.bigtable.data.v2.stub.BigtableBatchingCallSettings (google-cloud-bigtable-0.106.1-SNAPSHOT.jar)
Exception in thread "main" com.google.cloud.tools.dependencies.linkagemonitor.LinkageMonitorException: Found 5 new linkage errors
	at com.google.cloud.tools.dependencies.linkagemonitor.LinkageMonitor.run(LinkageMonitor.java:105)
	at com.google.cloud.tools.dependencies.linkagemonitor.LinkageMonitor.main(LinkageMonitor.java:63)

@kolea2, can you confirm whether it's ok to merge this in?

@olavloite
Copy link
Author

@skuruppu I had the same issue with a different PR yesterday and talked to @kolea2 about it. She confirmed that it is unrelated to this

@olavloite olavloite merged commit 5b77c1f into googleapis:master Aug 29, 2019
@kolea2
Copy link
Contributor

kolea2 commented Aug 29, 2019

@skuruppu @olavloite yep, that is a temporary break while we wait for the linkage monitor build to be updated. Fine to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants