From dbf7f64bafa92778dd225b811315f87abf9ee221 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 2 Oct 2018 22:01:28 -0700 Subject: [PATCH] Revert "Revert "Revert "Cloud Spanner DML & PartitionedDML support (#3703)" (#3741)" (#3755)" This reverts commit 65ca2f3d03d2744f59e5d4109c4efebe998a9514. --- .../google/cloud/spanner/DatabaseClient.java | 49 +-- .../cloud/spanner/DatabaseClientImpl.java | 14 +- .../com/google/cloud/spanner/ResultSet.java | 13 +- .../com/google/cloud/spanner/SessionPool.java | 12 - .../com/google/cloud/spanner/SpannerImpl.java | 184 +++-------- .../cloud/spanner/TransactionContext.java | 7 - .../cloud/spanner/spi/v1/GrpcSpannerRpc.java | 12 - .../cloud/spanner/spi/v1/SpannerRpc.java | 3 - .../cloud/spanner/GrpcResultSetTest.java | 24 +- .../google/cloud/spanner/it/ITDMLTest.java | 298 ------------------ 10 files changed, 64 insertions(+), 552 deletions(-) delete mode 100644 google-cloud-clients/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDMLTest.java diff --git a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java index 969af0275fcf..3120e651feb2 100644 --- a/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java +++ b/google-cloud-clients/google-cloud-spanner/src/main/java/com/google/cloud/spanner/DatabaseClient.java @@ -135,7 +135,7 @@ public interface DatabaseClient { ReadOnlyTransaction singleUseReadOnlyTransaction(); /** - * Returns a read-only transaction context in which a single read or query can be performed at +   * Returns a read-only transaction context in which a single read or query can be performed at the * given timestamp bound. This method differs from {@link #singleUse(TimestampBound)} in that the * read timestamp used may be inspected after the read has returned data or finished successfully. * @@ -269,51 +269,4 @@ public interface DatabaseClient { * */ TransactionManager transactionManager(); - - /** - * Returns the lower bound of rows modified by this DML statement. - * - *

The method will block until the update is complete. Running a DML statement with this method - * does not offer exactly once semantics, and therfore the DML statement should be idempotent. The - * DML statement must be fully-partitionable. Specifically, the statement must be expressible as - * the union of many statements which each access only a single row of the table. This is a - * Partitioned DML transaction in which a single Partitioned DML statement is executed. - * Partitioned DML partitions the key space and runs the DML statement over each partition in - * parallel using separate, internal transactions that commit independently. Partitioned DML - * transactions do not need to be committed. - * - *

Partitioned DML updates are used to execute a single DML statement with a different - * execution strategy that provides different, and often better, scalability properties for large, - * table-wide operations than DML in a {@link #readWriteTransaction()} transaction. Smaller scoped - * statements, such as an OLTP workload, should prefer using {@link - * TransactionContext#executeUpdate(Statement)} with {@link #readWriteTransaction()}. - * - *