googleapis / googleapis/google-cloud-java
[java-spanner] AsyncTransactionManager.CommitTimestampFuture violates Future.get contract
Offen
#12,251
1 Kommentar
0 Reaktionen
1 zugewiesene Person
Zugewiesen an @sakthivelmanii
Auf GitHub ansehen
api: spanner
- Vorherrschende Sprache
- Java
- Sterne
- 2.1k
- Forks
- 1.2k
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 154
Beschreibung
`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.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.