aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorilnaz <ilnaz@ydb.tech>2022-07-21 15:47:21 +0300
committerilnaz <ilnaz@ydb.tech>2022-07-21 15:47:21 +0300
commit4fc945f9177d94ae69c94276cc6f3277a0284f1f (patch)
tree05c96132bc416cb0b9464cc0a785ee16e3ffdf46
parente69963bdc1ff2a83c4d9914f1af110a4cf04c32e (diff)
downloadydb-4fc945f9177d94ae69c94276cc6f3277a0284f1f.tar.gz
Support for regions
-rw-r--r--ydb/core/protos/flat_scheme_op.proto1
-rw-r--r--ydb/core/tx/datashard/s3_common.h4
-rw-r--r--ydb/core/tx/schemeshard/schemeshard_export_flow_proposals.cpp4
-rw-r--r--ydb/public/api/protos/ydb_export.proto3
4 files changed, 12 insertions, 0 deletions
diff --git a/ydb/core/protos/flat_scheme_op.proto b/ydb/core/protos/flat_scheme_op.proto
index 2db6d7e036..ea6856e61f 100644
--- a/ydb/core/protos/flat_scheme_op.proto
+++ b/ydb/core/protos/flat_scheme_op.proto
@@ -867,6 +867,7 @@ message TS3Settings {
optional string ProxyHost = 9;
optional uint32 ProxyPort = 10;
optional EScheme ProxyScheme = 11;
+ optional string Region = 12;
message TLimits {
optional uint32 ReadBatchSize = 1 [default = 8388608]; // 8 MB
diff --git a/ydb/core/tx/datashard/s3_common.h b/ydb/core/tx/datashard/s3_common.h
index db81617d01..6ca33bf9fb 100644
--- a/ydb/core/tx/datashard/s3_common.h
+++ b/ydb/core/tx/datashard/s3_common.h
@@ -35,6 +35,10 @@ inline Aws::Client::ClientConfiguration ConfigFromSettings(const NKikimrSchemeOp
Y_FAIL("Unknown scheme");
}
+ if (settings.HasRegion()) {
+ config.region = settings.GetRegion();
+ }
+
if (settings.HasVerifySSL()) {
config.verifySSL = settings.GetVerifySSL();
}
diff --git a/ydb/core/tx/schemeshard/schemeshard_export_flow_proposals.cpp b/ydb/core/tx/schemeshard/schemeshard_export_flow_proposals.cpp
index 2f2176743e..62a1c5845a 100644
--- a/ydb/core/tx/schemeshard/schemeshard_export_flow_proposals.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard_export_flow_proposals.cpp
@@ -150,6 +150,10 @@ THolder<TEvSchemeShard::TEvModifySchemeTransaction> BackupPropose(
Y_FAIL("Unknown scheme");
}
+ if (const auto region = exportSettings.region()) {
+ backupSettings.SetRegion(region);
+ }
+
if (const auto compression = exportSettings.compression()) {
Y_VERIFY(FillCompression(*task.MutableCompression(), compression));
}
diff --git a/ydb/public/api/protos/ydb_export.proto b/ydb/public/api/protos/ydb_export.proto
index ca1d796929..4e7d33c2bd 100644
--- a/ydb/public/api/protos/ydb_export.proto
+++ b/ydb/public/api/protos/ydb_export.proto
@@ -111,6 +111,9 @@ message ExportToS3Settings {
// - zstd.
// - zstd-N, where N is compression level, e.g. zstd-3.
string compression = 10;
+
+ // Region to use in requests
+ string region = 11;
}
message ExportToS3Result {