Skip to content

Commit a8e601a

Browse files
authored
doc(spanner): deprecate old MakeConnection() overloads (#10284)
Raise the disfavor for `ConnectionOptions` and `SessionPoolOptions` arguments to `spanner::MakeConnection()` from @note to @deprecated. Also removed some stale inclusions of `connection_options.h` and `session_pool_options.h`.
1 parent a8b2f3c commit a8e601a

File tree

7 files changed

+6
-9
lines changed

7 files changed

+6
-9
lines changed

google/cloud/spanner/client.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -961,8 +961,8 @@ std::shared_ptr<spanner::Connection> MakeConnection(spanner::Database const& db,
961961
* The returned connection object should not be used directly, rather it should
962962
* be given to a `Client` instance, and methods should be invoked on `Client`.
963963
*
964-
* @note Prefer using the `MakeConnection()` overload that accepts
965-
* `google::cloud::Options`.
964+
* @deprecated Please use the `MakeConnection()` overload that accepts
965+
* `google::cloud::Options` instead.
966966
*
967967
* @see `Connection`
968968
*
@@ -979,8 +979,8 @@ std::shared_ptr<Connection> MakeConnection(
979979
/**
980980
* @copydoc MakeConnection(Database const&, ConnectionOptions const&, SessionPoolOptions)
981981
*
982-
* @note Prefer using the `MakeConnection()` overload that accepts
983-
* `google::cloud::Options`.
982+
* @deprecated Please use the `MakeConnection()` overload that accepts
983+
* `google::cloud::Options` instead.
984984
*
985985
* @param retry_policy override the default `RetryPolicy`, controls how long
986986
* the returned `Connection` object retries requests on transient

google/cloud/spanner/internal/defaults.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Options DefaultOptions(Options opts) {
7373
}
7474
}
7575

76-
// Sets Spanner-specific options from session_pool_options.h
76+
// Sets Spanner-specific session-pool options.
7777
auto& num_channels = opts.lookup<GrpcNumChannelsOption>();
7878
num_channels = (std::max)(num_channels, 1);
7979
if (!opts.has<spanner::SessionPoolMinSessionsOption>()) {

google/cloud/spanner/internal/defaults_test.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "google/cloud/spanner/internal/defaults.h"
1616
#include "google/cloud/spanner/internal/session_pool.h"
1717
#include "google/cloud/spanner/options.h"
18-
#include "google/cloud/spanner/session_pool_options.h"
1918
#include "google/cloud/common_options.h"
2019
#include "google/cloud/grpc_options.h"
2120
#include "google/cloud/internal/compiler_info.h"

google/cloud/spanner/internal/metadata_spanner_stub_test.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "google/cloud/spanner/internal/metadata_spanner_stub.h"
1616
#include "google/cloud/spanner/database.h"
1717
#include "google/cloud/spanner/testing/mock_spanner_stub.h"
18+
#include "google/cloud/common_options.h"
1819
#include "google/cloud/internal/api_client_header.h"
1920
#include "google/cloud/testing_util/status_matchers.h"
2021
#include "google/cloud/testing_util/validate_metadata.h"

google/cloud/spanner/internal/session_pool.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include "google/cloud/spanner/internal/session.h"
2222
#include "google/cloud/spanner/internal/spanner_stub.h"
2323
#include "google/cloud/spanner/retry_policy.h"
24-
#include "google/cloud/spanner/session_pool_options.h"
2524
#include "google/cloud/spanner/version.h"
2625
#include "google/cloud/backoff_policy.h"
2726
#include "google/cloud/completion_queue.h"

google/cloud/spanner/internal/spanner_stub.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INTERNAL_SPANNER_STUB_H
1616
#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_INTERNAL_SPANNER_STUB_H
1717

18-
#include "google/cloud/spanner/connection_options.h"
1918
#include "google/cloud/spanner/database.h"
2019
#include "google/cloud/spanner/version.h"
2120
#include "google/cloud/completion_queue.h"

google/cloud/spanner/samples/samples.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include "google/cloud/spanner/admin/instance_admin_options.h"
2222
#include "google/cloud/spanner/backoff_policy.h"
2323
#include "google/cloud/spanner/backup.h"
24-
#include "google/cloud/spanner/connection_options.h"
2524
#include "google/cloud/spanner/create_instance_request_builder.h"
2625
#include "google/cloud/spanner/row.h"
2726
#include "google/cloud/spanner/testing/debug_log.h" // TODO(#4758): remove

0 commit comments

Comments
 (0)