aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniil Cherednik <dcherednik@yandex-team.ru>2022-03-17 20:03:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-03-17 20:03:01 +0300
commitbd42172cd60aa10c334a3ff0a50cfb484d4b747d (patch)
treeb4142f273ae76457d76d88bfec06f19cbcd4f1b7
parent6cd2f2e57d12f964d04a6d930e03fb2103e150fb (diff)
downloadydb-bd42172cd60aa10c334a3ff0a50cfb484d4b747d.tar.gz
Allow request without database for static node. KIKIMR-14509
ref:018b1852612f5a9d6bca53a273c6ab5ff46956ee
-rw-r--r--ydb/core/grpc_services/grpc_request_proxy.cpp2
-rw-r--r--ydb/services/ydb/ydb_table_ut.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/ydb/core/grpc_services/grpc_request_proxy.cpp b/ydb/core/grpc_services/grpc_request_proxy.cpp
index 14bb45680d..eeac1849b8 100644
--- a/ydb/core/grpc_services/grpc_request_proxy.cpp
+++ b/ydb/core/grpc_services/grpc_request_proxy.cpp
@@ -201,7 +201,7 @@ private:
if (maybeDatabaseName && !maybeDatabaseName.GetRef().empty()) {
databaseName = CanonizePath(maybeDatabaseName.GetRef());
} else {
- if (!AllowYdbRequestsWithoutDatabase) {
+ if (!AllowYdbRequestsWithoutDatabase && DynamicNode) {
requestBaseCtx->ReplyUnauthenticated("Requests without specified database is not allowed");
return;
} else {
diff --git a/ydb/services/ydb/ydb_table_ut.cpp b/ydb/services/ydb/ydb_table_ut.cpp
index 088b3a38a0..3e461635ef 100644
--- a/ydb/services/ydb/ydb_table_ut.cpp
+++ b/ydb/services/ydb/ydb_table_ut.cpp
@@ -1019,7 +1019,8 @@ Y_UNIT_TEST_SUITE(YdbYqlClient) {
};
auto status = client.RetryOperationSync(call);
- UNIT_ASSERT_VALUES_EQUAL_C(status.GetStatus(), EStatus::CLIENT_UNAUTHENTICATED, status.GetIssues().ToString());
+ // KIKIMR-14509 - reslore old behaviour allow requests without database for storage nodes
+ UNIT_ASSERT_VALUES_EQUAL_C(status.GetStatus(), EStatus::SUCCESS, status.GetIssues().ToString());
}
TString location = TStringBuilder() << "localhost:" << grpc;