Skip to content

Commit da52805

Browse files
authored
Merge branch 'stable-25-1' into changelog/stable-25-1-2025-06-08
2 parents 6d2e8e2 + 7b91758 commit da52805

File tree

1,002 files changed

+15412
-6900
lines changed

Some content is hidden

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

1,002 files changed

+15412
-6900
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Assign a reviewer for documentation
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
7+
jobs:
8+
assign-docs-reviewer:
9+
runs-on: ubuntu-latest
10+
if: contains(github.event.pull_request.body, '* Documentation') && !contains(github.event.pull_request.body, '* New feature')
11+
steps:
12+
- name: Assign a random documentation reviewer, excluding the PR author and busy members
13+
uses: actions/github-script@v7
14+
with:
15+
github-token: ${{ secrets.YDBOT_TOKEN }}
16+
script: |
17+
const teamSlug = "primary-docs-reviewers";
18+
const org = "ydb-platform";
19+
20+
// Get team members
21+
const teamMembers = await github.paginate("GET /orgs/{org}/teams/{team_slug}/members", {
22+
org,
23+
team_slug: teamSlug
24+
});
25+
if (teamMembers.length === 0) {
26+
core.setFailed("No team members found in the team.");
27+
}
28+
29+
// Get the PR author
30+
const prAuthor = context.payload.pull_request.user.login;
31+
32+
// Function to check if a user is busy:
33+
// It checks for "busy" in their status message OR if they have limitedAvailability set (checkbox).
34+
async function isBusy(login) {
35+
const query = `
36+
query($login: String!) {
37+
user(login: $login) {
38+
status {
39+
message
40+
indicatesLimitedAvailability
41+
}
42+
}
43+
}
44+
`;
45+
try {
46+
const result = await github.graphql(query, { login });
47+
const status = result.user.status;
48+
if (!status) return false;
49+
// Consider user busy if limitedAvailability is true or message contains "busy"
50+
return status.indicatesLimitedAvailability === true ||
51+
(status.message && status.message.toLowerCase().includes("busy"));
52+
} catch (error) {
53+
console.log(`Error checking status for ${login}: ${error}`);
54+
return false; // On error, assume not busy
55+
}
56+
}
57+
58+
// Filter out the PR author and busy members
59+
const availableMembers = [];
60+
for (const member of teamMembers) {
61+
if (member.login === prAuthor) {
62+
console.log(`Skipping the author ${member.login}.`);
63+
continue;
64+
}
65+
if (await isBusy(member.login)) {
66+
console.log(`Skipping ${member.login} as they appear busy.`);
67+
continue;
68+
}
69+
availableMembers.push(member);
70+
}
71+
72+
if (availableMembers.length === 0) {
73+
core.setFailed("No available team members after excluding PR author and busy members.");
74+
}
75+
76+
// Pick a random available member
77+
const randomIndex = Math.floor(Math.random() * availableMembers.length);
78+
const randomMember = availableMembers[randomIndex].login;
79+
80+
// Get the PR number from the event context
81+
const prNumber = context.payload.pull_request.number;
82+
// Assign the PR to the selected team member
83+
await github.rest.issues.addAssignees({
84+
owner: context.repo.owner,
85+
repo: context.repo.repo,
86+
issue_number: prNumber,
87+
assignees: [randomMember]
88+
});
89+
console.log(`Assigned PR #${prNumber} to ${randomMember}`);

CHANGELOG.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
### Functionality
44

55
* 17114:Improved audit logging for user management operations. The audit logs now include details about user modification actions such as password changes, user blocking, and unblocking, making it easier to troubleshoot login issues. [#17114](https://github.com/ydb-platform/ydb/pull/17114) ([flown4qqqq](https://github.com/flown4qqqq))
6+
* 17691:New UI handler for fetching data from topics. [#17691](https://github.com/ydb-platform/ydb/pull/17691) ([FloatingCrowbar](https://github.com/FloatingCrowbar))
7+
* 16688:Added to set [grpc compression](https://github.com/grpc/grpc/blob/master/doc/compression_cookbook.md) at channel level. [#16688](https://github.com/ydb-platform/ydb/pull/16688) ([Vitalii Gridnev](https://github.com/gridnevvvit))
8+
* 18017:Implemented client balancing of partitions when reading using the Kafka protocol (like Kafka itself). Previously, balancing took place on the server. [#18017](https://github.com/ydb-platform/ydb/pull/18017) ([Nikolay Shestakov](https://github.com/nshestakov))
9+
* 17734:Added automatic cleanup of temporary tables and directories during export to S3. [#17734](https://github.com/ydb-platform/ydb/pull/17734) ([stanislav_shchetinin](https://github.com/stanislav-shchetinin))
610
* 18352:Added database audit logs in console's tablet.[#18352](https://github.com/ydb-platform/ydb/pull/18352) ([flown4qqqq](https://github.com/flown4qqqq))
711
* 18298:Limited the creation of ReassignerActor to only one active instance to prevent [SelfHeal](https://ydb.tech/docs/ru/maintenance/manual/selfheal) from overloading BSC. [#18298](https://github.com/ydb-platform/ydb/pull/18298) ([Sergey Belyakov](https://github.com/serbel324))
812
* 18294:Changed version format from Year.Major.Minor.Hotfix to Year.Major.Minor.Patch.Hotfix [#18294](https://github.com/ydb-platform/ydb/pull/18294) ([Sergey Belyakov](https://github.com/serbel324))
@@ -12,19 +16,16 @@
1216

1317
### Bug fixes
1418

15-
* 17313:Fixed CopyTable operation to allow copying tables with all column types present in the source table, regardless of feature flag settings. This resolves an issue where copying tables with certain decimal types would fail after version downgrades. [#17313](https://github.com/ydb-platform/ydb/pull/17313) ([azevaykin](https://github.com/azevaykin))
16-
* 17122:Fixed an rare issue that caused client applications to hang during commit operations. The problem occurred because the `TEvDeletePartition` message could arrive before the `TEvApproveWriteQuota` message. The batch did not send TEvConsumed and this blocked the queue of write quota requests. [#17122](https://github.com/ydb-platform/ydb/pull/17122) ([Alek5andr-Kotov](https://github.com/Alek5andr-Kotov))
17-
* 18362:Table auto partitioning: Fixed crash when selecting split key from access samples containing a mix of full key and key prefix operations (e.g. exact/range reads). [#18362](https://github.com/ydb-platform/ydb/pull/18362) ([ijon](https://github.com/ijon))
18-
* 18301:Optimized memory usage in transactions with a large number of participants by changing the storage and resending mechanism for TEvReadSet messages. [#18302](https://github.com/ydb-platform/ydb/pull/18301) ([Alek5andr-Kotov](https://github.com/Alek5andr-Kotov))
19+
* 18647:[Fixed](https://github.com/ydb-platform/ydb/pull/18647) an [issue](https://github.com/ydb-platform/ydb/issues/17885) where the index type was incorrectly defaulting to GLOBAL SYNC when UNIQUE was explicitly specified in the query. ([Vasily Gerasimov](https://github.com/UgnineSirdis))
20+
* 18086:Bug fixes for direct read in topics [#18086](https://github.com/ydb-platform/ydb/pull/18086) ([qyryq](https://github.com/qyryq))
21+
* 16797:Fixed an issue with topic auto-partitioning when the `max_active_partition` configuration parameter was set via the `ALTER TOPIC` statement. [#16797](https://github.com/ydb-platform/ydb/pull/16797) ([Nikolay Shestakov](https://github.com/nshestakov))
1922
* 18296:Fixed replication continuing to consume disk space when storage was low, which caused VDisks to become read-only. [#18296](https://github.com/ydb-platform/ydb/pull/18296) ([Sergey Belyakov](https://github.com/serbel324))
2023
* 18271:Fix replication bug #10650 [#18271](https://github.com/ydb-platform/ydb/pull/18271) ([Alexander Rutkovsky](https://github.com/alexvru))
2124
* 18231:Fix segfault that could happen while retrying Whiteboard requests. [#18231](https://github.com/ydb-platform/ydb/pull/18231) ([Andrei Rykov](https://github.com/StekPerepolnen))
2225
* 19402:Make legacy signatures for Digest UDF strict again (follows up f97455e). [#19402](https://github.com/ydb-platform/ydb/pull/19402) ([Igor Munkin](https://github.com/igormunkin))
2326
* 19350:Drop excess langver argument from `TFunctionTypeInfoBuilder` ctor in mkql_udf_ut.cpp. [#19350](https://github.com/ydb-platform/ydb/pull/19350) ([Igor Munkin](https://github.com/igormunkin))
2427
* 19114:fixes issue in stream lookup join https://github.com/ydb-platform/ydb/issues/19083 [#19114](https://github.com/ydb-platform/ydb/pull/19114) ([Vitalii Gridnev](https://github.com/gridnevvvit))
25-
* 18954:cherry-pick c6a21d1f, 896fcc7f, 2dcd562c, 42258a1 and fcc18ade. Relates to #18487.
26-
27-
... [#18954](https://github.com/ydb-platform/ydb/pull/18954) ([Igor Munkin](https://github.com/igormunkin))
28+
* 18954:cherry-pick c6a21d1f, 896fcc7f, 2dcd562c, 42258a1 and fcc18ade. Relates to #18487. [#18954](https://github.com/ydb-platform/ydb/pull/18954) ([Igor Munkin](https://github.com/igormunkin))
2829
* 18920:Temporarily tweak `DeclareSignature` for `Datetime::Format` and several typeaware UDFs for the incremental upgrade. [#18920](https://github.com/ydb-platform/ydb/pull/18920) ([Igor Munkin](https://github.com/igormunkin))
2930
* 18873:Temporarily tweak `DeclareSignature` for `DigestFunctionUdf` class for the incremental upgrade. [#18873](https://github.com/ydb-platform/ydb/pull/18873) ([Igor Munkin](https://github.com/igormunkin))
3031
* 17839:fixes issue where not all tablets are shown for pers queue group on the tablets tab in diagnostics #15230
@@ -43,11 +44,14 @@ fixes issue with long time loading databases page on certain databases due to ti
4344
fixes issue with no tablets shown for table index on tablets tab #17103
4445
fixes issue with Optional<Struct> columns are always shown as NULLs #17226
4546
fixes potential security issue with CORS headers #17670 [#17839](https://github.com/ydb-platform/ydb/pull/17839) ([Alexey Efimov](https://github.com/adameat))
47+
* 18938:In the table description columns are returned in the same order as they were specified in CREATE TABLE. [#18938](https://github.com/ydb-platform/ydb/pull/18938) ([Ilnaz Nizametdinov](https://github.com/CyberROFL))
48+
* 18794:[Fixed](https://github.com/db-platform/adb/pull/18794) a rare [bug](https://github.com/ydb-platform/ydb/issues/18615) with PQ tablet restarts. [#18794](https://github.com/ydb-platform/ydb/pull/18794) ([Alek5andr-Kotov](https://github.com/Alek5andr-Kotov))
4649

4750
### Performance
4851

52+
* 17712:Introduced Intersect, Add and IsEmpty operations to Roaring UDF. [#17712](https://github.com/ydb-platform/ydb/pull/17712) ([jsjant](https://github.com/jsjant))
53+
* 17578:Added naive bulk And to Roaring UDF. [#17578](https://github.com/ydb-platform/ydb/pull/17578) ([jsjant](https://github.com/jsjant)
4954
* 19447:Enhancements to shared threads in the actor system.
5055
We stabilized dynamic resizing of thread count in pools.
5156
Implemented instant thread pool upscaling to utilize up to 4 cores under sudden bursts of load (this improvement is particularly noticeable in the IC pool) [#19447](https://github.com/ydb-platform/ydb/pull/19447) ([kruall](https://github.com/kruall))
52-
* 19445:Improved the actor system structures for intensive multithreaded workloads [#19445](https://github.com/ydb-platform/ydb/pull/19445) ([kruall](https://github.com/kruall))
53-
57+
* 19445:Improved the actor system structures for intensive multithreaded workloads [#19445](https://github.com/ydb-platform/ydb/pull/19445) ([kruall](https://github.com/kruall))

ydb/apps/ydb/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
* Fix `ydb operation get` not working for running operations.
12
* Added `--retries` to `ydb workload <clickbenh|tpch|tpcds> run` command.
23
* Added `--partition-size` param to `ydb workload <clickbench/tpcds/tpch> init`.
34
* Fixed return code of command `ydb workload * run --check-canonical` for the case when benchmark query results differ from canonical ones.

ydb/core/base/table_index.cpp

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "table_index.h"
22

33
#include <ydb/core/base/table_vector_index.h>
4+
#include <ydb/core/protos/tx_datashard.pb.h>
45

56
namespace NKikimr::NTableIndex {
67
namespace {
@@ -154,7 +155,11 @@ bool IsCompatibleIndex(NKikimrSchemeOp::EIndexType indexType, const TTableColumn
154155
}
155156
tmp.clear();
156157
tmp.insert(table.Keys.begin(), table.Keys.end());
157-
tmp.insert(index.KeyColumns.begin(), index.KeyColumns.end() - (isSecondaryIndex ? 0 : 1));
158+
if (isSecondaryIndex) {
159+
tmp.insert(index.KeyColumns.begin(), index.KeyColumns.end());
160+
} else {
161+
// Vector indexes allow to add all columns both to index & data
162+
}
158163
if (const auto* broken = IsContains(index.DataColumns, tmp, true)) {
159164
explain = TStringBuilder()
160165
<< "the same column can't be used as key and data column for one index, for example " << *broken;
@@ -185,4 +190,36 @@ bool IsBuildImplTable(std::string_view tableName) {
185190
|| tableName.ends_with(NTableVectorKmeansTreeIndex::BuildSuffix1);
186191
}
187192

193+
static constexpr TClusterId PostingParentFlag = (1ull << 63ull);
194+
195+
// Note: if cluster id is too big, something is wrong with cluster enumeration
196+
void EnsureNoPostingParentFlag(TClusterId parent) {
197+
Y_ENSURE((parent & PostingParentFlag) == 0);
198+
}
199+
200+
TClusterId SetPostingParentFlag(TClusterId parent) {
201+
EnsureNoPostingParentFlag(parent);
202+
return (parent | PostingParentFlag);
203+
}
204+
205+
TString ToShortDebugString(const NKikimrTxDataShard::TEvReshuffleKMeansRequest& record) {
206+
auto copy = record;
207+
TStringBuilder result;
208+
// clusters are not human readable and can be large like 100Kb+
209+
copy.ClearClusters();
210+
result << copy.ShortDebugString();
211+
result << " Clusters: " << record.ClustersSize();
212+
return result;
213+
}
214+
215+
TString ToShortDebugString(const NKikimrTxDataShard::TEvSampleKResponse& record) {
216+
auto copy = record;
217+
TStringBuilder result;
218+
// rows are not human readable and can be large like 100Kb+
219+
copy.ClearRows();
220+
result << copy.ShortDebugString();
221+
result << " Rows: " << record.RowsSize();
222+
return result;
223+
}
224+
188225
}

ydb/core/base/table_index.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
#include <span>
1313
#include <string_view>
1414

15+
namespace NKikimrTxDataShard {
16+
class TEvReshuffleKMeansRequest;
17+
class TEvSampleKResponse;
18+
}
19+
1520
namespace NKikimr {
1621

1722
inline constexpr const char* SYSTEM_COLUMN_PREFIX = "__ydb_";
@@ -38,9 +43,15 @@ bool IsImplTable(std::string_view tableName);
3843
bool IsBuildImplTable(std::string_view tableName);
3944

4045
using TClusterId = ui64;
41-
4246
inline constexpr auto ClusterIdType = Ydb::Type::UINT64;
4347
inline constexpr const char* ClusterIdTypeName = "Uint64";
4448

49+
void EnsureNoPostingParentFlag(TClusterId parent);
50+
51+
TClusterId SetPostingParentFlag(TClusterId parent);
52+
53+
TString ToShortDebugString(const NKikimrTxDataShard::TEvReshuffleKMeansRequest& record);
54+
TString ToShortDebugString(const NKikimrTxDataShard::TEvSampleKResponse& record);
55+
4556
}
4657
}

ydb/core/driver_lib/run/run.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,14 @@ static TString ReadFile(const TString& fileName) {
519519

520520
void TKikimrRunner::InitializeGracefulShutdown(const TKikimrRunConfig& runConfig) {
521521
GracefulShutdownSupported = true;
522+
DrainTimeout = TDuration::Seconds(30);
522523
const auto& config = runConfig.AppConfig.GetShutdownConfig();
523524
if (config.HasMinDelayBeforeShutdownSeconds()) {
524525
MinDelayBeforeShutdown = TDuration::Seconds(config.GetMinDelayBeforeShutdownSeconds());
525526
}
527+
if (config.HasDrainTimeoutSeconds()) {
528+
DrainTimeout = TDuration::Seconds(config.GetDrainTimeoutSeconds());
529+
}
526530
}
527531

528532
void TKikimrRunner::InitializeKqpController(const TKikimrRunConfig& runConfig) {
@@ -1875,7 +1879,8 @@ void TKikimrRunner::KikimrStop(bool graceful) {
18751879
DisableActorCallstack();
18761880

18771881
if (drainProgress) {
1878-
for (ui32 i = 0; i < 300; i++) {
1882+
ui32 maxTicks = DrainTimeout.MilliSeconds() / 100;
1883+
for (ui32 i = 0; i < maxTicks; i++) {
18791884
auto cnt = drainProgress->GetOnlineTabletsEstimate();
18801885
if (cnt > 0) {
18811886
Cerr << "Waiting for drain to complete: " << cnt << " tablets are online on node." << Endl;

ydb/core/driver_lib/run/run.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class TKikimrRunner : public virtual TThrRefBase, private IGlobalObjectStorage {
4444
bool EnabledGrpcService = false;
4545
bool GracefulShutdownSupported = false;
4646
TDuration MinDelayBeforeShutdown;
47+
TDuration DrainTimeout;
4748
THolder<NSQS::TAsyncHttpServer> SqsHttp;
4849

4950
THolder<NYdb::TDriver> YdbDriver;

ydb/core/grpc_services/operation_helpers.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ Ydb::TOperationId ToOperationId(const NKikimrIndexBuilder::TIndexBuild& build) {
5959
void ToOperation(const NKikimrIndexBuilder::TIndexBuild& build, Ydb::Operations::Operation* operation) {
6060
operation->set_id(NOperationId::ProtoToString(ToOperationId(build)));
6161
operation->mutable_issues()->CopyFrom(build.GetIssues());
62+
if (build.HasStartTime()) {
63+
*operation->mutable_create_time() = build.GetStartTime();
64+
}
65+
if (build.HasEndTime()) {
66+
*operation->mutable_end_time() = build.GetEndTime();
67+
}
68+
if (build.HasUserSID()) {
69+
operation->set_created_by(build.GetUserSID());
70+
}
6271

6372
switch (build.GetState()) {
6473
case Ydb::Table::IndexBuildState::STATE_DONE:

ydb/core/grpc_services/rpc_alter_table.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ class TAlterTableRPC : public TRpcSchemeRequestActor<TAlterTableRPC, TEvAlterTab
342342
void SendAddIndexOpToSS(const TActorContext& ctx, ui64 schemeShardId) {
343343
SetSchemeShardId(schemeShardId);
344344
auto ev = std::make_unique<NSchemeShard::TEvIndexBuilder::TEvCreateRequest>(TxId, DatabaseName, std::move(IndexBuildSettings));
345+
if (UserToken) {
346+
ev->Record.SetUserSID(UserToken->GetUserSID());
347+
}
345348
ForwardToSchemeShard(ctx, std::move(ev));
346349
}
347350

ydb/core/kqp/executer_actor/kqp_data_executer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2028,7 +2028,7 @@ class TKqpDataExecuter : public TKqpExecuterBase<TKqpDataExecuter, EExecType::Da
20282028
auto& stageInfo = TasksGraph.GetStageInfo(stageId);
20292029
AFL_ENSURE(stageInfo.Id == stageId);
20302030

2031-
if (stageInfo.Meta.ShardKind == NSchemeCache::TSchemeCacheRequest::KindAsyncIndexTable) {
2031+
if (stageInfo.Meta.ShardKind == NSchemeCache::ETableKind::KindAsyncIndexTable) {
20322032
TMaybe<TString> error;
20332033

20342034
if (stageInfo.Meta.ShardKey->RowOperation != TKeyDesc::ERowOperation::Read) {

0 commit comments

Comments
 (0)