Skip to content

Commit 5260e44

Browse files
author
Anton Bobkov
committed
Merge branch 'stable-24-4' into docs-backport-18129-to-stable-24-4
2 parents 01c25ed + 926b514 commit 5260e44

File tree

92 files changed

+1135
-1068
lines changed

Some content is hidden

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

92 files changed

+1135
-1068
lines changed

ydb/core/kafka_proxy/kafka_connection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class TKafkaConnection: public TActorBootstrapped<TKafkaConnection>, public TNet
101101

102102
void Bootstrap() {
103103
Context->ConnectionId = SelfId();
104-
Context->RequireAuthentication = NKikimr::AppData()->EnforceUserTokenRequirement;
104+
Context->RequireAuthentication = NKikimr::AppData()->EnforceUserTokenRequirement || NKikimr::AppData()->PQConfig.GetRequireCredentialsInNewProtocol();
105105
// if no authentication required, then we can use local database as our target
106106
if (!Context->RequireAuthentication) {
107107
Context->DatabasePath = NKikimr::AppData()->TenantName;
@@ -452,7 +452,7 @@ class TKafkaConnection: public TActorBootstrapped<TKafkaConnection>, public TNet
452452
return;
453453
}
454454

455-
Context->RequireAuthentication = NKikimr::AppData()->EnforceUserTokenRequirement;
455+
Context->RequireAuthentication = NKikimr::AppData()->EnforceUserTokenRequirement || NKikimr::AppData()->PQConfig.GetRequireCredentialsInNewProtocol();
456456
Context->UserToken = event->UserToken;
457457
Context->DatabasePath = event->DatabasePath;
458458
Context->AuthenticationStep = authStep;

ydb/core/mind/bscontroller/impl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ class TBlobStorageController : public TActor<TBlobStorageController>, public TTa
280280
const ui64 allocatedSizeBefore = Metrics.GetAllocatedSize();
281281
const ui32 prevStatusFlags = Metrics.GetStatusFlags();
282282
Metrics.MergeFrom(vDiskMetrics);
283+
Metrics.DiscardUnknownFields();
283284
MetricsDirty = true;
284285
UpdateVDiskMetrics();
285286
*allocatedSizeIncrementPtr = Metrics.GetAllocatedSize() - allocatedSizeBefore;

ydb/core/tablet/resource_broker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,7 @@ NKikimrResourceBroker::TResourceBrokerConfig MakeDefaultConfig()
12751275
const ui64 CSGeneralCompactionMemoryLimit = NOlap::TGlobalLimits::GeneralCompactionMemoryLimit;
12761276
const ui64 CSScanMemoryLimit = NOlap::TGlobalLimits::ScanMemoryLimit;
12771277

1278-
const ui64 TotalCPU = 20;
1278+
const ui64 TotalCPU = 256; // means unlimited
12791279
const ui64 TotalMemory = 16ULL << 30;
12801280

12811281
static_assert(KqpRmQueueMemory < TotalMemory);

ydb/core/tablet/resource_broker_ut.cpp

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ namespace NKikimr {
1515
using namespace NKikimrResourceBroker;
1616
using namespace NResourceBroker;
1717

18-
static void SetupLogging(TTestActorRuntime& runtime) {
18+
static void SetupLogging(TTestActorRuntime& runtime)
19+
{
1920
NActors::NLog::EPriority priority = ENABLE_DETAILED_RESOURCE_BROKER_LOG ? NLog::PRI_DEBUG : NLog::PRI_ERROR;
2021
runtime.SetLogPriority(NKikimrServices::RESOURCE_BROKER, priority);
2122
}
2223

23-
static NKikimrResourceBroker::TResourceBrokerConfig
24-
MakeTestConfig()
24+
static NKikimrResourceBroker::TResourceBrokerConfig MakeTestConfig()
2525
{
2626
NKikimrResourceBroker::TResourceBrokerConfig config;
2727

@@ -71,16 +71,14 @@ MakeTestConfig()
7171
return config;
7272
}
7373

74-
static void
75-
WaitForBootstrap(TTestActorRuntime &runtime)
74+
static void WaitForBootstrap(TTestActorRuntime &runtime)
7675
{
7776
TDispatchOptions options;
7877
options.FinalEvents.emplace_back(TEvents::TSystem::Bootstrap, 1);
7978
UNIT_ASSERT(runtime.DispatchEvents(options));
8079
}
8180

82-
static void
83-
SubmitTask(TTestActorRuntime &runtime, TActorId broker, TActorId sender,
81+
static void SubmitTask(TTestActorRuntime &runtime, TActorId broker, TActorId sender,
8482
ui64 id, ui64 cpu, ui64 memory, const TString &type,
8583
ui32 priority, TIntrusivePtr<TThrRefBase> cookie = nullptr)
8684
{
@@ -94,8 +92,7 @@ SubmitTask(TTestActorRuntime &runtime, TActorId broker, TActorId sender,
9492
runtime.Send(new IEventHandle(broker, sender, event.Release()));
9593
}
9694

97-
static void
98-
UpdateTask(TTestActorRuntime &runtime, TActorId broker, TActorId sender,
95+
static void UpdateTask(TTestActorRuntime &runtime, TActorId broker, TActorId sender,
9996
ui64 id, ui64 cpu, ui64 memory, ui32 priority, const TString &type,
10097
bool resubmit = false)
10198
{
@@ -107,8 +104,7 @@ UpdateTask(TTestActorRuntime &runtime, TActorId broker, TActorId sender,
107104
runtime.Send(new IEventHandle(broker, sender, event.Release()));
108105
}
109106

110-
static void
111-
UpdateTaskCookie(TTestActorRuntime &runtime, TActorId broker, TActorId sender,
107+
static void UpdateTaskCookie(TTestActorRuntime &runtime, TActorId broker, TActorId sender,
112108
ui64 id, TIntrusivePtr<TThrRefBase> cookie)
113109
{
114110
TAutoPtr<TEvResourceBroker::TEvUpdateTaskCookie> event
@@ -117,17 +113,15 @@ UpdateTaskCookie(TTestActorRuntime &runtime, TActorId broker, TActorId sender,
117113
runtime.Send(new IEventHandle(broker, sender, event.Release()));
118114
}
119115

120-
static void
121-
RemoveTask(TTestActorRuntime &runtime, TActorId broker, TActorId sender, ui64 id)
116+
static void RemoveTask(TTestActorRuntime &runtime, TActorId broker, TActorId sender, ui64 id)
122117
{
123118
TAutoPtr<TEvResourceBroker::TEvRemoveTask> event
124119
= new TEvResourceBroker::TEvRemoveTask(id);
125120

126121
runtime.Send(new IEventHandle(broker, sender, event.Release()));
127122
}
128123

129-
static void
130-
FinishTask(TTestActorRuntime &runtime, TActorId broker, TActorId sender, ui64 id)
124+
static void FinishTask(TTestActorRuntime &runtime, TActorId broker, TActorId sender, ui64 id)
131125
{
132126
TAutoPtr<TEvResourceBroker::TEvFinishTask> event
133127
= new TEvResourceBroker::TEvFinishTask(id);
@@ -147,8 +141,7 @@ WaitForResourceAllocation(TTestActorRuntime &runtime, ui64 id,
147141
return reply->TaskId;
148142
}
149143

150-
static void
151-
WaitForError(TTestActorRuntime &runtime, ui64 id, TEvResourceBroker::TStatus::ECode code,
144+
static void WaitForError(TTestActorRuntime &runtime, ui64 id, TEvResourceBroker::TStatus::ECode code,
152145
TIntrusivePtr<TThrRefBase> cookie = nullptr)
153146
{
154147
TAutoPtr<IEventHandle> handle;
@@ -158,8 +151,7 @@ WaitForError(TTestActorRuntime &runtime, ui64 id, TEvResourceBroker::TStatus::EC
158151
UNIT_ASSERT_VALUES_EQUAL(reply->Cookie, cookie);
159152
}
160153

161-
static void
162-
CheckCounters(::NMonitoring::TDynamicCounterPtr counters, const TString &group, const TString &name,
154+
static void CheckCounters(::NMonitoring::TDynamicCounterPtr counters, const TString &group, const TString &name,
163155
ui64 cpu, ui64 memory, ui64 finished, ui64 enqueued, ui64 infly)
164156
{
165157
auto g = counters->GetSubgroup(group, name);
@@ -185,14 +177,14 @@ static void CheckConfigure(TTestActorRuntime &runtime, TActorId broker, TActorId
185177
UNIT_ASSERT_VALUES_EQUAL((int)rec.GetSuccess(), (int)success);
186178
}
187179

188-
static
189-
TIntrusivePtr<IResourceBroker> GetInstantResourceBroker(TTestActorRuntime &runtime, TActorId broker, TActorId sender) {
180+
static TIntrusivePtr<IResourceBroker> GetInstantResourceBroker(TTestActorRuntime &runtime, TActorId broker, TActorId sender) {
190181
runtime.Send(new IEventHandle(broker, sender, new TEvResourceBroker::TEvResourceBrokerRequest));
191182
auto answer = runtime.GrabEdgeEvent<TEvResourceBroker::TEvResourceBrokerResponse>(sender);
192183
return answer->Get()->ResourceBroker;
193184
}
194185

195186
Y_UNIT_TEST_SUITE(TResourceBroker) {
187+
196188
Y_UNIT_TEST(TestErrors) {
197189
TTestBasicRuntime runtime;
198190
SetupTabletServices(runtime);
@@ -894,6 +886,7 @@ Y_UNIT_TEST_SUITE(TResourceBroker) {
894886
};
895887

896888
Y_UNIT_TEST_SUITE(TResourceBrokerInstant) {
889+
897890
Y_UNIT_TEST(Test) {
898891
TTestBasicRuntime runtime;
899892
SetupTabletServices(runtime);
@@ -1007,6 +1000,7 @@ Y_UNIT_TEST_SUITE(TResourceBrokerInstant) {
10071000
CheckCounters(counters, "queue", "total", 210, 320, 1, 0, 2);
10081001
}
10091002
}
1003+
10101004
};
10111005

10121006
Y_UNIT_TEST_SUITE(TResourceBrokerConfig) {
@@ -1130,6 +1124,21 @@ Y_UNIT_TEST_SUITE(TResourceBrokerConfig) {
11301124
UNIT_ASSERT_VALUES_EQUAL(config.ShortDebugString(), "ResourceLimit { Cpu: 20 Memory: 2048 }");
11311125
}
11321126

1127+
Y_UNIT_TEST(DefaultConfig) {
1128+
auto config = MakeDefaultConfig();
1129+
1130+
Cerr << config.DebugString() << Endl;
1131+
1132+
ui64 queuesCpu = 0;
1133+
for (const auto& q : config.GetQueues()) {
1134+
queuesCpu += q.GetLimit().GetCpu();
1135+
}
1136+
Cerr << "Total queues cpu: " << queuesCpu;
1137+
1138+
// see https://github.com/ydb-platform/ydb/issues/18513
1139+
UNIT_ASSERT_LE(queuesCpu, config.GetResourceLimit().GetCpu());
1140+
}
1141+
11331142
} // TResourceBrokerConfig
11341143

11351144
} // NKikimr

ydb/core/tx/columnshard/engines/reader/sys_view/abstract/iterator.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ class TStatsIteratorBase: public TScanIteratorBase {
5050

5151
// Leave only requested columns
5252
auto resultBatch = NArrow::TColumnOperator().Adapt(originalBatch, ResultSchema).DetachResult();
53-
NArrow::TStatusValidator::Validate(ReadMetadata->GetProgram().ApplyProgram(resultBatch));
53+
auto applyConclusion = ReadMetadata->GetProgram().ApplyProgram(resultBatch);
54+
if (!applyConclusion.ok()) {
55+
return TConclusionStatus::Fail(applyConclusion.ToString());
56+
}
5457
if (resultBatch->num_rows() == 0) {
5558
continue;
5659
}

ydb/core/tx/schemeshard/schemeshard__table_stats.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,11 @@ bool TTxStoreTableStats::PersistSingleStats(const TPathId& pathId,
407407
const TTableIndexInfo* index = Self->Indexes.Value(pathElement->ParentPathId, nullptr).Get();
408408
const TTableInfo* mainTableForIndex = Self->GetMainTableForIndex(pathId);
409409

410+
TString errStr;
410411
const auto forceShardSplitSettings = Self->SplitSettings.GetForceShardSplitSettings();
411412
TVector<TShardIdx> shardsToMerge;
412413
if ((!index || index->State == NKikimrSchemeOp::EIndexStateReady)
414+
&& Self->CheckInFlightLimit(NKikimrSchemeOp::ESchemeOpSplitMergeTablePartitions, errStr)
413415
&& table->CheckCanMergePartitions(Self->SplitSettings, forceShardSplitSettings, shardIdx, shardsToMerge, mainTableForIndex)
414416
) {
415417
TTxId txId = Self->GetCachedTxId(ctx);

ydb/docs/en/core/concepts/topic.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ A source ID is an arbitrary string up to 2048 characters long. This is usually t
129129
#### Sample source IDs {#source-id-examples}
130130

131131
| Type | ID | Description |
132-
--- | --- | ---
132+
| --- | --- | --- |
133133
| File | Server ID | Files are used to store application logs. In this case, it's convenient to use the server ID as a source ID. |
134134
| User actions | ID of the class of user actions, such as "viewing a page", "making a purchase", and so on. | It's important to handle user actions in the order they were performed by the user. At the same time, there is no need to handle every single user action in one application. In this case, it's convenient to group user actions by class. |
135135

@@ -140,7 +140,7 @@ A message group ID is an arbitrary string up to 2048 characters long. This is us
140140
#### Sample message group IDs {#group-id-examples}
141141

142142
| Type | ID | Description |
143-
--- | --- | ---
143+
| --- | --- | --- |
144144
| File | Full file path | All data from the server and the file it hosts will be sent to the same partition. |
145145
| User actions | User ID | It's important to handle user actions in the order they were performed. In this case, it's convenient to use the user ID as a source ID. |
146146

@@ -153,9 +153,9 @@ Sequence numbers are not used if [no-deduplication mode](#no-dedup) is enabled.
153153
### Sample message sequence numbers {#seqno-examples}
154154

155155
| Type | Example | Description |
156-
--- | --- | ---
156+
| --- | --- | --- |
157157
| File | Offset of transferred data from the beginning of a file | You can't delete lines from the beginning of a file, since this will lead to skipping some data as duplicates or losing some data. |
158-
| DB table | Auto-increment record ID |
158+
| DB table | Auto-increment record ID | |
159159

160160
## Message retention period {#retention-time}
161161

@@ -168,13 +168,13 @@ When transferring data, the producer app indicates that a message can be compres
168168
Supported codecs are explicitly listed in each topic. When making an attempt to write data to a topic with a codec that is not supported, a write error occurs.
169169

170170
| Codec | Description |
171-
--- | ---
171+
| --- | --- |
172172
| `raw` | No compression. |
173173
| `gzip` | [Gzip](https://en.wikipedia.org/wiki/Gzip) compression. |
174174
{% if audience != "external" %}
175-
`lzop` | [lzop](https://en.wikipedia.org/wiki/Lzop) compression.
175+
| `lzop` | [lzop](https://en.wikipedia.org/wiki/Lzop) compression. |
176176
{% endif %}
177-
`zstd` | [zstd](https://en.wikipedia.org/wiki/Zstd) compression.
177+
| `zstd` | [zstd](https://en.wikipedia.org/wiki/Zstd) compression. |
178178

179179
## Consumer {#consumer}
180180

ydb/docs/en/core/contributor/documentation/genres.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## {{ ydb-short-name }} documentation genres
1+
# {{ ydb-short-name }} documentation genres
22

33
This article complements [{#T}](style-guide.md) by describing the main genres used in {{ ydb-short-name }} documentation. Understanding these genres helps contributors place new content in the appropriate section and maintain a consistent structure.
44

5-
### Theory {#theory}
5+
## Theory {#theory}
66

77
**Primary goal for the reader:** build a solid knowledge foundation by understanding the fundamental concepts, architecture, and principles behind {{ ydb-short-name }}.
88

@@ -15,7 +15,7 @@ This article complements [{#T}](style-guide.md) by describing the main genres us
1515

1616
Theory documentation is primarily found in the ["Concepts"](../../concepts/index.md) section but also appears in role-specific folders when the theoretical information is relevant only to a particular audience.
1717

18-
### Guide {#guide}
18+
## Guide {#guide}
1919

2020
**Primary goal for the reader:** accomplish a specific practical task or implement a particular solution with {{ ydb-short-name }} by following instructions.
2121

@@ -29,7 +29,7 @@ Guides are practical, step-by-step instructions that help users accomplish a spe
2929

3030
Guides are primarily found in role-specific folders like ["For DevOps"](../../devops/index.md), ["For Developers"](../../dev/index.md), and ["For Security Engineers"](../../security/index.md), as well as in the ["Troubleshooting"](../../troubleshooting/index.md) section.
3131

32-
### Reference {#reference}
32+
## Reference {#reference}
3333

3434
**Primary goal for the reader:** find additional information about a specific niche topic related to {{ ydb-short-name }}.
3535

@@ -43,7 +43,7 @@ Reference documentation provides comprehensive, detailed information about {{ yd
4343

4444
Reference documentation is designed to be found as needed and is the most detailed level of documentation. It's particularly useful when users need specific information about functions, settings, or keywords. This content is primarily found in the ["Reference"](../../reference/index.md) section.
4545

46-
### FAQ {#faq}
46+
## FAQ {#faq}
4747

4848
**Primary goal for the reader:** quickly find answers to common questions encountered when working with {{ ydb-short-name }}.
4949

@@ -57,7 +57,7 @@ Frequently Asked Questions (FAQ) documentation answers common questions about {{
5757

5858
FAQ content is primarily found in the ["Questions and answers"](../../faq/index.md) section and is designed to help users who are searching for specific solutions to common situations.
5959

60-
### Recipe {#recipe}
60+
## Recipe {#recipe}
6161

6262
**Primary goal for the reader:** implement a specific, focused solution to a common issue or use case with {{ ydb-short-name }}.
6363

@@ -71,7 +71,7 @@ Recipes are short, focused mini-guides that demonstrate how to accomplish specif
7171

7272
Recipes are primarily found in the ["Recipes"](../../recipes/index.md) section, though similar content may also appear in role-specific folders.
7373

74-
### Release notes {#release-notes}
74+
## Release notes {#release-notes}
7575

7676
**Primary goal for the reader:** stay informed about new features, improvements, bug fixes, and breaking changes in {{ ydb-short-name }} releases.
7777

@@ -85,7 +85,7 @@ Release notes document changes, improvements, and fixes in each new version of {
8585

8686
Release notes are found in the ["Changelog"](../../changelog-server.md) section and help users understand what has changed between versions and decide whether to upgrade.
8787

88-
### Collection of links {#links}
88+
## Collection of links {#links}
8989

9090
**Primary goal for the reader:** discover additional resources, learning materials, and external content related to {{ ydb-short-name }}.
9191

ydb/docs/en/core/contributor/documentation/structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## {{ ydb-short-name }} documentation structure
1+
# {{ ydb-short-name }} documentation structure
22

33
This article complements [{#T}](style-guide.md). It explains the current top-level folders of the documentation and what kind of content belongs in each. As a rule of thumb, most top-level sections focus either on a specific target audience (if named "For ...") or on a specific [genre](genres.md).
44

ydb/docs/en/core/dev/system-views.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Cumulative fields (`RowReads`, `RowUpdates`, and so on) store the accumulated va
3030
Table structure:
3131

3232
| Field | Description |
33-
--- | ---
33+
| --- | --- |
3434
| `OwnerId` | ID of the SchemeShard serving the table.<br/>Type: `Uint64`.<br/>Key: `0`. |
3535
| `PathId` | ID of the SchemeShard path.<br/>Type: `Uint64`.<br/>Key: `1`. |
3636
| `PartIdx` | Partition sequence number.<br/>Type: `Uint64`.<br/>Key: `2`. |
@@ -102,7 +102,7 @@ Query text limit is 4 KB.
102102
All tables have the same set of fields:
103103

104104
| Field | Description |
105-
--- | ---
105+
| --- | --- |
106106
| `IntervalEnd` | The end of a one-minute or one-hour interval.<br/>Type: `Timestamp`.<br/>Key: `0`. |
107107
| `Rank` | Rank of a top query.<br/>Type: `Uint32`.<br/>Key: `1`. |
108108
| `QueryText` | Query text.<br/>Type: `Utf8`. |
@@ -181,7 +181,7 @@ Restrictions:
181181
Table structure:
182182

183183
| Field | Description |
184-
---|---
184+
| ---|--- |
185185
| `IntervalEnd` | The end of a one-minute interval.<br/>Type: `Timestamp`.<br/>Key: `0`. |
186186
| `Rank` | Query rank within an interval (by the SumCPUTime field).<br/>Type: `Uint32`.<br/>Key: `1`. |
187187
| `QueryText` | Query text.<br/>Type: `Utf8`. |
@@ -253,7 +253,7 @@ These tables contain partitions with peak loads of more than 70% (`CPUCores` > 0
253253
Both tables have the same set of fields:
254254

255255
| Field | Description |
256-
--- | ---
256+
| --- | --- |
257257
| `IntervalEnd` | The end of a one-minute or one-hour interval.<br/>Type: `Timestamp`.<br/>Key: `0`. |
258258
| `Rank` | Partition rank within an interval (by CPUCores).<br/>Type: `Uint32`.<br/>Key: `1`. |
259259
| `TabletId` | ID of the tablet serving the partition.<br/>Type: `Uint64`. |

0 commit comments

Comments
 (0)