protected void ensureTransactionId() throws ClickHouseException {
        if (!implicit) {
            XID serverTxId = XID.of(issue(QUERY_SELECT_TX_ID).getValue(0).asTuple());
            if (!serverTxId.equals(id.get())) {
                throw new ClickHouseTransactionException(
                        ClickHouseUtils.format(
                                "Inconsistent transaction ID - client expected %s but found %s on server.",
                                id.get(), serverTxId),
                        this);
            }
        }
    }
Ensures client and server are using the exact same transaction ID.

@throws ClickHouseException when transaction ID is inconsistent between
                            client and server
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseTransaction.java