phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-1559) Allow specifying auto-commit mode in the connection URL or connection properties
Date Sat, 27 Dec 2014 18:19:13 GMT


James Taylor commented on PHOENIX-1559:

[~gabriel.reid] - one tweak to this commit that might make it feasible for new users to have
auto-commit be on by default: In this code:
+    public static boolean getAutoCommit(String url, Properties info) {
+        String autoCommit = findProperty(url, info, PhoenixRuntime.AUTO_COMMIT_ATTRIB);
+        return Boolean.valueOf(autoCommit);
+    }
instead of mapping a null autoCommit to false, look for the PhoenixRuntime.AUTO_COMMIT_ATTRIB
in the QueryServices props, like this so that it'll default based on the property from the
config or from connection property if specified.
    Boolean autoCommit = null;
    String autoCommitStr = findProperty(url, info, PhoenixRuntime.AUTO_COMMIT_ATTRIB);
    if (autoCommitStr != null) {
        autoCommit = Boolean.valueOf(autoCommitStr);
    this.autoCommit =,,

> Allow specifying auto-commit mode in the connection URL or connection properties
> --------------------------------------------------------------------------------
>                 Key: PHOENIX-1559
>                 URL:
>             Project: Phoenix
>          Issue Type: New Feature
>            Reporter: Gabriel Reid
>            Assignee: Gabriel Reid
>             Fix For: 5.0.0, 4.3
>         Attachments: PHOENIX-1559.patch
> As reported in PHOENIX-1543, the JDBC spec states that auto-commit should be enabled
on all newly-created connections, but Phoenix currently disables auto-commit by default.
> Some "enterprise" JDBC tools assume that auto-commit is enabled on all new connections,
and don't work correctly unless it is.
> It would be useful if it was possible to explicitly turn on auto-commit by supplying
a setting in the connection URL or connection properties. This would not only make it possible
to work with tooling that assumes that all JDBC drivers follow this spec, but it would also
provide a kind of backwards-compatibility mode once PHOENIX-1543 is implemented.

This message was sent by Atlassian JIRA

View raw message