xtern commented on code in PR #1880:
URL: https://github.com/apache/ignite-3/pull/1880#discussion_r1164048384
##########
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:
I tried it and I like it better the way it is now (less code/duplicate
code), but if you insist I can split it.
--
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]