You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by li...@apache.org on 2023/10/02 18:43:51 UTC
[arrow-adbc] branch main updated: feat(go/adbc/driver/flightsql): log new connections (#1146)
This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new 79c7a3b6 feat(go/adbc/driver/flightsql): log new connections (#1146)
79c7a3b6 is described below
commit 79c7a3b6f77c39f4317460e3585631da27137b23
Author: David Li <li...@gmail.com>
AuthorDate: Mon Oct 2 14:43:45 2023 -0400
feat(go/adbc/driver/flightsql): log new connections (#1146)
Fixes #1087.
---
c/driver_manager/adbc_driver_manager.cc | 3 ++-
go/adbc/driver/flightsql/flightsql_database.go | 1 +
go/adbc/drivermgr/adbc_driver_manager.cc | 3 ++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/c/driver_manager/adbc_driver_manager.cc b/c/driver_manager/adbc_driver_manager.cc
index 475af6ee..96326605 100644
--- a/c/driver_manager/adbc_driver_manager.cc
+++ b/c/driver_manager/adbc_driver_manager.cc
@@ -150,7 +150,7 @@ struct ManagedLibrary {
void* handle = dlopen(library, RTLD_NOW | RTLD_LOCAL);
if (!handle) {
- error_message = "dlopen() failed: ";
+ error_message = "[DriverManager] dlopen() failed: ";
error_message += dlerror();
// If applicable, append the shared library prefix/extension and
@@ -180,6 +180,7 @@ struct ManagedLibrary {
if (handle) {
this->handle = handle;
} else {
+ SetError(error, error_message);
return ADBC_STATUS_INTERNAL;
}
#endif // defined(_WIN32)
diff --git a/go/adbc/driver/flightsql/flightsql_database.go b/go/adbc/driver/flightsql/flightsql_database.go
index fc1469e2..250a2f04 100644
--- a/go/adbc/driver/flightsql/flightsql_database.go
+++ b/go/adbc/driver/flightsql/flightsql_database.go
@@ -387,6 +387,7 @@ func getFlightClient(ctx context.Context, loc string, d *databaseImpl) (*flights
}
}
+ d.Logger.DebugContext(ctx, "new client", "location", loc)
return cl, nil
}
diff --git a/go/adbc/drivermgr/adbc_driver_manager.cc b/go/adbc/drivermgr/adbc_driver_manager.cc
index 475af6ee..96326605 100644
--- a/go/adbc/drivermgr/adbc_driver_manager.cc
+++ b/go/adbc/drivermgr/adbc_driver_manager.cc
@@ -150,7 +150,7 @@ struct ManagedLibrary {
void* handle = dlopen(library, RTLD_NOW | RTLD_LOCAL);
if (!handle) {
- error_message = "dlopen() failed: ";
+ error_message = "[DriverManager] dlopen() failed: ";
error_message += dlerror();
// If applicable, append the shared library prefix/extension and
@@ -180,6 +180,7 @@ struct ManagedLibrary {
if (handle) {
this->handle = handle;
} else {
+ SetError(error, error_message);
return ADBC_STATUS_INTERNAL;
}
#endif // defined(_WIN32)