Skip to content

Commit 315c057

Browse files
authored
Merge branch 'stable-25-2' into backport-27430-to-stable-25-2
2 parents c93be7c + d5a10a9 commit 315c057

File tree

71 files changed

+1839
-572
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1839
-572
lines changed

.github/config/muted_ya.txt

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
ydb/apps/ydb/ut YdbWorkloadTransferTopicToTable.Default_Run
2-
ydb/core/blobstorage/ut_blobstorage/ut_huge HugeBlobOnlineSizeChange.Compaction
3-
ydb/core/blobstorage/ut_blobstorage/ut_huge [*/*] chunk chunk
4-
ydb/core/blobstorage/ut_vdisk TBsVDiskGC.GCPutKeepBarrierSync
5-
ydb/core/client/ut TObjectStorageListingTest.TestSkipShards
2+
ydb/core/blobstorage/ut_blobstorage GroupReconfiguration.BsControllerDoesNotDisableGroupNoRequestsToNodesWVDisks
63
ydb/core/cms/ut_sentinel_unstable TSentinelUnstableTests.BSControllerCantChangeStatus
74
ydb/core/fq/libs/row_dispatcher/ut sole chunk chunk
5+
ydb/core/http_proxy/ut/inside_ydb_ut TestKinesisHttpProxy.TestCounters
86
ydb/core/keyvalue/ut_trace TKeyValueTracingTest.ReadHuge
97
ydb/core/keyvalue/ut_trace TKeyValueTracingTest.ReadSmall
108
ydb/core/keyvalue/ut_trace TKeyValueTracingTest.WriteHuge
119
ydb/core/keyvalue/ut_trace TKeyValueTracingTest.WriteSmall
10+
ydb/core/kqp/ut/federated_query/s3 KqpFederatedQuery.TestReadLargeParquetFile
11+
ydb/core/kqp/ut/federated_query/s3 sole chunk chunk
1212
ydb/core/kqp/ut/join KqpIndexLookupJoin.LeftJoinRightNullFilter+StreamLookup
1313
ydb/core/kqp/ut/join KqpIndexLookupJoin.LeftJoinRightNullFilter-StreamLookup
14+
ydb/core/kqp/ut/olap KqpOlapJson.BloomMixIndexesVariants[false,false,1,0,1000,0.5,CATEGORY_BLOOM_FILTER]
15+
ydb/core/kqp/ut/olap KqpOlapLocks.DeleteAbsentMultipleShards+Reboot
1416
ydb/core/kqp/ut/olap KqpOlapSysView.StatsSysViewTable
1517
ydb/core/kqp/ut/olap KqpOlapWrite.TierDraftsGCWithRestart
1618
ydb/core/kqp/ut/olap [*/*] chunk chunk
@@ -35,22 +37,28 @@ ydb/core/kqp/ut/tx KqpSnapshotIsolation.TSimpleOltpNoSink
3537
ydb/core/persqueue/ut TPQTest.TestComactificationWithRebootsMediumMsg
3638
ydb/core/persqueue/ut TPQTest.TestComactifiedWithRetention
3739
ydb/core/persqueue/ut [*/*] chunk chunk
40+
ydb/core/persqueue/ut/ut_with_sdk TopicAutoscaling.PartitionSplit_AutosplitByLoad
3841
ydb/core/statistics/aggregator/ut AnalyzeColumnshard.AnalyzeRebootColumnShard
39-
ydb/core/tablet_flat/ut TSharedPageCache.ClockPro
40-
ydb/core/tablet_flat/ut TSharedPageCache.ThreeLeveledLRU
42+
ydb/core/statistics/service/ut BasicStatistics.PersistenceWithStorageFailuresAndReboots
43+
ydb/core/statistics/service/ut [*/*] chunk chunk
44+
ydb/core/tablet_flat/ut TSharedPageCache.Compaction_FlatIndex
4145
ydb/core/tx/datashard/ut_incremental_backup IncrementalBackup.ComplexRestoreBackupCollection+WithIncremental
42-
ydb/core/tx/schemeshard/ut_index_build_reboots IndexBuildTestReboots.BaseCase
46+
ydb/core/tx/schemeshard/ut_background_cleaning TSchemeshardBackgroundCleaningTest.SchemeshardBackgroundCleaningTestCreateCleanManyTables
47+
ydb/core/tx/schemeshard/ut_sequence_reboots [*/*] chunk chunk
4348
ydb/core/viewer/tests test.py.test_topic_data_cdc
4449
ydb/core/viewer/tests test.py.test_viewer_query_long
4550
ydb/core/viewer/tests test.py.test_viewer_query_long_multipart
4651
ydb/public/sdk/cpp/src/client/topic/ut TxUsage.Sinks_Olap_WriteToTopicAndTable_4_Query
4752
ydb/public/sdk/cpp/src/client/topic/ut TxUsage.Sinks_Olap_WriteToTopicAndTable_4_Table
4853
ydb/public/sdk/cpp/src/client/topic/ut TxUsage.Sinks_Oltp_WriteToTopicAndTable_6_Query
4954
ydb/public/sdk/cpp/src/client/topic/ut TxUsage.Sinks_Oltp_WriteToTopicAndTable_6_Table
50-
ydb/services/ydb/sdk_sessions_pool_ut YdbSdkSessionsPool.StressTestSync10
55+
ydb/services/ydb/sdk_sessions_pool_ut YdbSdkSessionsPool.StressTestSync1
56+
ydb/services/ydb/sdk_sessions_ut YdbSdkSessions.TestSdkFreeSessionAfterBadSessionQueryService
5157
ydb/services/ydb/sdk_sessions_ut YdbSdkSessions.TestSdkFreeSessionAfterBadSessionQueryServiceStreamCall
5258
ydb/services/ydb/ut YdbLogStore.AlterLogTable
59+
ydb/services/ydb/ut YdbQueryService.TestCreateAndAttachSession
5360
ydb/tests/fq/mem_alloc test_scheduling.py.TestSchedule.test_skip_busy[kikimr0]
61+
ydb/tests/fq/s3 test_s3_1.py.TestS3.test_top_level_listing_2[v1-kikimr_params0-false-client0]
5462
ydb/tests/fq/s3 test_s3_1.py.TestS3.test_write_result[v1-kikimr_params0-client0]
5563
ydb/tests/fq/yds test_2_selects_limit.py.TestSelectLimit.test_select_same[v1]
5664
ydb/tests/fq/yds test_2_selects_limit.py.TestSelectLimit.test_select_sequence[v1]
@@ -59,8 +67,10 @@ ydb/tests/fq/yds test_mem_alloc.py.TestMemAlloc.test_join_alloc[v1]
5967
ydb/tests/fq/yds test_recovery.py.TestRecovery.test_ic_disconnection
6068
ydb/tests/fq/yds test_select_limit_db_id.py.TestSelectLimitWithDbId.test_select_same_with_id[v1-mvp_external_ydb_endpoint0]
6169
ydb/tests/fq/yds test_yds_bindings.py.TestBindings.test_yds_insert[v1]
70+
ydb/tests/fq/yds test_yq_streaming.py.TestYqStreaming.test_yq_streaming_read_from_binding_date_time[v1]
6271
ydb/tests/functional/hive test_drain.py.TestHive.test_drain_on_stop
6372
ydb/tests/functional/serverless test_serverless.py.test_database_with_disk_quotas[enable_alter_database_create_hive_first--false]
73+
ydb/tests/functional/sqs/multinode test_multinode_cluster.py.TestSqsMultinodeCluster.test_has_messages_counters[kick_tablets-std]
6474
ydb/tests/functional/tenants test_tenants.py.TestTenants.test_create_drop_create_table3[enable_alter_database_create_hive_first--false]
6575
ydb/tests/functional/tenants test_tenants.py.TestTenants.test_create_drop_create_table3[enable_alter_database_create_hive_first--true]
6676
ydb/tests/functional/tenants test_tenants.py.TestTenants.test_stop_start[enable_alter_database_create_hive_first--false]

ydb/core/io_formats/cell_maker/cell_maker.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -518,13 +518,13 @@ bool CheckCellValue(const TCell& cell, const NScheme::TTypeInfo& typeInfo) {
518518
case NScheme::NTypeIds::Interval:
519519
return (ui64)std::abs(cell.AsValue<i64>()) < NUdf::MAX_TIMESTAMP;
520520
case NScheme::NTypeIds::Date32:
521-
return cell.AsValue<i32>() < NUdf::MAX_DATE32;
521+
return cell.AsValue<i32>() >= NUdf::MIN_DATE32 && cell.AsValue<i32>() <= NUdf::MAX_DATE32;
522522
case NScheme::NTypeIds::Datetime64:
523-
return cell.AsValue<i64>() < NUdf::MAX_DATETIME64;
523+
return cell.AsValue<i64>() >= NUdf::MIN_DATETIME64 && cell.AsValue<i64>() <= NUdf::MAX_DATETIME64;
524524
case NScheme::NTypeIds::Timestamp64:
525-
return cell.AsValue<i64>() < NUdf::MAX_TIMESTAMP64;
525+
return cell.AsValue<i64>() >= NUdf::MIN_TIMESTAMP64 && cell.AsValue<i64>() <= NUdf::MAX_TIMESTAMP64;
526526
case NScheme::NTypeIds::Interval64:
527-
return std::abs(cell.AsValue<i64>()) < NUdf::MAX_INTERVAL64;
527+
return std::abs(cell.AsValue<i64>()) <= NUdf::MAX_INTERVAL64;
528528
case NScheme::NTypeIds::Utf8:
529529
return NYql::IsUtf8(cell.AsBuf());
530530
case NScheme::NTypeIds::Yson:

ydb/core/kqp/executer_actor/kqp_planner.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@ std::unique_ptr<TEvKqpNode::TEvStartKqpTasksRequest> TKqpPlanner::SerializeReque
221221
if (ArrayBufferMinFillPercentage) {
222222
serializedTask->SetArrayBufferMinFillPercentage(*ArrayBufferMinFillPercentage);
223223
}
224+
if (BufferPageAllocSize) {
225+
serializedTask->SetBufferPageAllocSize(*BufferPageAllocSize);
226+
}
224227
request.AddTasks()->Swap(serializedTask);
225228
}
226229

ydb/core/kqp/ut/query/kqp_query_ut.cpp

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <yql/essentials/ast/yql_ast.h>
1212
#include <yql/essentials/ast/yql_expr.h>
1313
#include <yql/essentials/core/yql_expr_optimize.h>
14+
#include <yql/essentials/public/udf/udf_data_type.h>
1415

1516
#include <library/cpp/json/json_reader.h>
1617

@@ -74,6 +75,115 @@ Y_UNIT_TEST_SUITE(KqpQuery) {
7475
UNIT_ASSERT_VALUES_EQUAL(counters.RecompileRequestGet()->Val(), 1);
7576
}
7677

78+
Y_UNIT_TEST_TWIN(ExtendedTimeOutOfBounds, BulkUpsert) {
79+
auto settings = TKikimrSettings().SetWithSampleTables(false);
80+
TKikimrRunner kikimr(settings);
81+
82+
auto queryClient = kikimr.GetQueryClient();
83+
auto tableClient = kikimr.GetTableClient();
84+
85+
{
86+
const std::string query = R"(
87+
CREATE TABLE `/Root/TimeTable` (
88+
Key UInt32 NOT NULL,
89+
V_Date32 Date32,
90+
V_Datetime64 Datetime64,
91+
V_Timestamp64 Timestamp64,
92+
V_Interval64 Interval64,
93+
PRIMARY KEY (Key)
94+
);
95+
)";
96+
auto result = queryClient.ExecuteQuery(query, NQuery::TTxControl::NoTx()).ExtractValueSync();
97+
UNIT_ASSERT_C(result.IsSuccess(), result.GetIssues().ToString());
98+
}
99+
100+
auto fUpsertAndCheck = [&]<typename T>(ui32 key, T value, bool success) {
101+
std::string colName;
102+
if (BulkUpsert) {
103+
TValueBuilder rows;
104+
rows.BeginList();
105+
rows.AddListItem().BeginStruct().AddMember("Key").Uint32(key);
106+
if constexpr (std::is_same_v<T, TWideDays>) {
107+
rows.AddMember("V_Date32").Date32(std::chrono::sys_time<TWideDays>(TWideDays(value)));
108+
colName = "V_Date32";
109+
} else if constexpr (std::is_same_v<T, TWideSeconds>) {
110+
rows.AddMember("V_Datetime64").Datetime64(std::chrono::sys_time<TWideSeconds>(TWideSeconds(value)));
111+
colName = "V_Datetime64";
112+
} else if constexpr (std::is_same_v<T, TWideMicroseconds>) {
113+
rows.AddMember("V_Timestamp64").Timestamp64(std::chrono::sys_time<TWideMicroseconds>(TWideMicroseconds(value)));
114+
colName = "V_Timestamp64";
115+
} else if constexpr (std::is_same_v<T, i64>) {
116+
rows.AddMember("V_Interval64").Interval64(TWideMicroseconds(value));
117+
colName = "V_Interval64";
118+
} else {
119+
UNIT_ASSERT_C(false, "Unsupported type");
120+
}
121+
rows.EndStruct().EndList();
122+
123+
auto result = tableClient.BulkUpsert("/Root/TimeTable", rows.Build()).GetValueSync();
124+
UNIT_ASSERT_VALUES_EQUAL_C(result.IsSuccess(), success, result.GetIssues().ToString());
125+
} else {
126+
auto params = std::move(TParamsBuilder().AddParam("$key").Uint32(key).Build());
127+
if constexpr (std::is_same_v<T, TWideDays>) {
128+
params.AddParam("$param").Date32(std::chrono::sys_time<TWideDays>(TWideDays(value))).Build();
129+
colName = "V_Date32";
130+
} else if constexpr (std::is_same_v<T, TWideSeconds>) {
131+
params.AddParam("$param").Datetime64(std::chrono::sys_time<TWideSeconds>(TWideSeconds(value))).Build();
132+
colName = "V_Datetime64";
133+
} else if constexpr (std::is_same_v<T, TWideMicroseconds>) {
134+
params.AddParam("$param").Timestamp64(std::chrono::sys_time<TWideMicroseconds>(TWideMicroseconds(value))).Build();
135+
colName = "V_Timestamp64";
136+
} else if constexpr (std::is_same_v<T, i64>) {
137+
params.AddParam("$param").Interval64(TWideMicroseconds(value)).Build();
138+
colName = "V_Interval64";
139+
} else {
140+
UNIT_ASSERT_C(false, "Unsupported type");
141+
}
142+
143+
auto result = queryClient.ExecuteQuery(Sprintf(R"(
144+
UPSERT INTO `/Root/TimeTable` (Key, %s) VALUES ($key, $param);
145+
)", colName.c_str()), NQuery::TTxControl::NoTx(), params.Build()).ExtractValueSync();
146+
UNIT_ASSERT_VALUES_EQUAL_C(result.IsSuccess(), success, result.GetIssues().ToString());
147+
}
148+
};
149+
150+
{
151+
// Date32
152+
fUpsertAndCheck(1, TWideDays(0), /* success */ true); // Basic
153+
fUpsertAndCheck(2, TWideDays(NYql::NUdf::MIN_DATE32), /* success */ true); // Min is inclusive
154+
fUpsertAndCheck(3, TWideDays(NYql::NUdf::MAX_DATE32), /* success */ true); // Max is inclusive
155+
fUpsertAndCheck(4, TWideDays(NYql::NUdf::MIN_DATE32 - 1), /* success */ false); // Out of bounds
156+
fUpsertAndCheck(5, TWideDays(NYql::NUdf::MAX_DATE32 + 1), /* success */ false); // Out of bounds
157+
}
158+
159+
{
160+
// Datetime64
161+
fUpsertAndCheck(11, TWideSeconds(0), /* success */ true); // Basic
162+
fUpsertAndCheck(12, TWideSeconds(NYql::NUdf::MIN_DATETIME64), /* success */ true); // Min is inclusive
163+
fUpsertAndCheck(13, TWideSeconds(NYql::NUdf::MAX_DATETIME64), /* success */ true); // Max is inclusive
164+
fUpsertAndCheck(14, TWideSeconds(NYql::NUdf::MIN_DATETIME64 - 1), /* success */ false); // Out of bounds
165+
fUpsertAndCheck(15, TWideSeconds(NYql::NUdf::MAX_DATETIME64 + 1), /* success */ false); // Out of bounds
166+
}
167+
168+
{
169+
// Timestamp64
170+
fUpsertAndCheck(21, TWideMicroseconds(0), /* success */ true); // Basic
171+
fUpsertAndCheck(22, TWideMicroseconds(NYql::NUdf::MIN_TIMESTAMP64), /* success */ true); // Min is inclusive
172+
fUpsertAndCheck(23, TWideMicroseconds(NYql::NUdf::MAX_TIMESTAMP64), /* success */ true); // Max is inclusive
173+
fUpsertAndCheck(24, TWideMicroseconds(NYql::NUdf::MIN_TIMESTAMP64 - 1), /* success */ false); // Out of bounds
174+
fUpsertAndCheck(25, TWideMicroseconds(NYql::NUdf::MAX_TIMESTAMP64 + 1), /* success */ false); // Out of bounds
175+
}
176+
177+
{
178+
// Interval64
179+
fUpsertAndCheck(31, static_cast<i64>(0), /* success */ true); // Basic
180+
fUpsertAndCheck(32, NYql::NUdf::MAX_INTERVAL64, /* success */ true); // Max is inclusive
181+
fUpsertAndCheck(33, -NYql::NUdf::MAX_INTERVAL64, /* success */ true); // -Max is inclusive
182+
fUpsertAndCheck(34, NYql::NUdf::MAX_INTERVAL64 + 1, /* success */ false); // Out of bounds
183+
fUpsertAndCheck(35, -(NYql::NUdf::MAX_INTERVAL64 + 1), /* success */ false); // Out of bounds
184+
}
185+
}
186+
77187
Y_UNIT_TEST_TWIN(DecimalOutOfPrecisionBulk, EnableParameterizedDecimal) {
78188
TKikimrSettings serverSettings;
79189
serverSettings.FeatureFlags.SetEnableParameterizedDecimal(EnableParameterizedDecimal);

ydb/core/persqueue/events/internal.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -861,18 +861,21 @@ struct TEvPQ {
861861
};
862862

863863
struct TEvTxCalcPredicateResult : public TEventLocal<TEvTxCalcPredicateResult, EvTxCalcPredicateResult> {
864-
TEvTxCalcPredicateResult(ui64 step, ui64 txId, const NPQ::TPartitionId& partition, TMaybe<bool> predicate) :
864+
TEvTxCalcPredicateResult(ui64 step, ui64 txId, const NPQ::TPartitionId& partition, TMaybe<bool> predicate,
865+
const TString& issueMsg) :
865866
Step(step),
866867
TxId(txId),
867868
Partition(partition),
868-
Predicate(predicate)
869+
Predicate(predicate),
870+
IssueMsg(issueMsg)
869871
{
870872
}
871873

872874
ui64 Step;
873875
ui64 TxId;
874876
NPQ::TPartitionId Partition;
875877
TMaybe<bool> Predicate;
878+
TString IssueMsg;
876879
};
877880

878881
struct TEvProposePartitionConfig : public TEventLocal<TEvProposePartitionConfig, EvProposePartitionConfig> {

0 commit comments

Comments
 (0)