From cfe9196f23c26bf4c464c0a6666258c06e401c27 Mon Sep 17 00:00:00 2001 From: Manit Gupta Date: Thu, 8 Feb 2024 00:12:16 +0530 Subject: [PATCH 1/2] Add RpcPriority to Txn --- .../teleport/v2/templates/SpannerTransactionWriterDoFn.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/datastream-to-spanner/src/main/java/com/google/cloud/teleport/v2/templates/SpannerTransactionWriterDoFn.java b/v2/datastream-to-spanner/src/main/java/com/google/cloud/teleport/v2/templates/SpannerTransactionWriterDoFn.java index 9484c99f5f..63d4386c10 100644 --- a/v2/datastream-to-spanner/src/main/java/com/google/cloud/teleport/v2/templates/SpannerTransactionWriterDoFn.java +++ b/v2/datastream-to-spanner/src/main/java/com/google/cloud/teleport/v2/templates/SpannerTransactionWriterDoFn.java @@ -213,7 +213,7 @@ public void processElement(ProcessContext c) { // Start transaction spannerAccessor .getDatabaseClient() - .readWriteTransaction(Options.tag(getTxnTag(c.getPipelineOptions()))) + .readWriteTransaction(Options.tag(getTxnTag(c.getPipelineOptions())), Options.priority(spannerConfig.getRpcPriority().get())) .run( (TransactionCallable) transaction -> { From 163b1005677ec6c15c48c0ec56008b1da6f6fea5 Mon Sep 17 00:00:00 2001 From: Manit Gupta Date: Thu, 8 Feb 2024 00:16:42 +0530 Subject: [PATCH 2/2] spotless --- .../teleport/v2/templates/SpannerTransactionWriterDoFn.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/v2/datastream-to-spanner/src/main/java/com/google/cloud/teleport/v2/templates/SpannerTransactionWriterDoFn.java b/v2/datastream-to-spanner/src/main/java/com/google/cloud/teleport/v2/templates/SpannerTransactionWriterDoFn.java index 63d4386c10..1598c1a677 100644 --- a/v2/datastream-to-spanner/src/main/java/com/google/cloud/teleport/v2/templates/SpannerTransactionWriterDoFn.java +++ b/v2/datastream-to-spanner/src/main/java/com/google/cloud/teleport/v2/templates/SpannerTransactionWriterDoFn.java @@ -213,7 +213,9 @@ public void processElement(ProcessContext c) { // Start transaction spannerAccessor .getDatabaseClient() - .readWriteTransaction(Options.tag(getTxnTag(c.getPipelineOptions())), Options.priority(spannerConfig.getRpcPriority().get())) + .readWriteTransaction( + Options.tag(getTxnTag(c.getPipelineOptions())), + Options.priority(spannerConfig.getRpcPriority().get())) .run( (TransactionCallable) transaction -> {