AMashenkov commented on code in PR #1880:
URL: https://github.com/apache/ignite-3/pull/1880#discussion_r1163957677
##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/JdbcQueryEventHandlerImpl.java:
##########
@@ -287,6 +300,26 @@ public CompletableFuture<JdbcMetaPrimaryKeysResult>
primaryKeysMetaAsync(JdbcMet
return meta.getPrimaryKeys(req.schemaName(),
req.tableName()).thenApply(JdbcMetaPrimaryKeysResult::new);
}
+ /** {@inheritDoc} */
+ @Override
+ public CompletableFuture<JdbcFinishTxResult> finishTxAsync(long
connectionId, boolean commit) {
+ JdbcConnectionContext connectionContext;
+
+ try {
+ connectionContext =
resources.get(connectionId).get(JdbcConnectionContext.class);
+ } catch (IgniteInternalCheckedException exception) {
+ return CompletableFuture.completedFuture(new
JdbcFinishTxResult(Response.STATUS_FAILED, "Connection is broken"));
+ }
+
+ return
connectionContext.finishTransactionAsync(commit).handle((ignored, t) -> {
Review Comment:
Also, I'd split methods with flags (like
connectionContext.finishTransactionAsync) into commitAsync and rollbackAsync to
be. more specific.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]