googleapis / googleapis/google-cloud-java
[java-spanner] AsyncTransactionManager.CommitTimestampFuture violates Future.get contract
Đang mở
api: spanner
- Ngôn ngữ chính
- Java
- Star
- 2.1k
- Fork
- 1.2k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 157
Mô tả
`CommitTimestampFuture` violates the `Future` contract by overriding `get()` to throw any caught exception other than `ExecutionException`. Namely, it unwraps any `AbortedException` and throws that directly.
This breaks any downstream code that operates on that `CommitTimestampFuture` via the `Future` interface. For example, transforming it to a Guava `ListenableFuture` and then calling the `kotlinx.coroutines.guava.await` extension function on it.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.