Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

24 3 merge 5 #10191

Merged
merged 24 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
963c49d
Capture TablePathPrefix (and other parts of the parser context) in CR…
jepett0 Sep 27, 2024
49ed038
Fix memory leak due to a misuse of AWS SDK (#9810)
jepett0 Sep 27, 2024
ece36f4
Views: throw a human-readable error in case of a missing WITH (securi…
jepett0 Sep 27, 2024
1517123
Restore indexes from backup with the original partitioning #7589 (#9815)
jepett0 Sep 27, 2024
012754c
24-3: NodeBroker: use deltas when returning recently added nodes (#9161)
snaury Sep 27, 2024
301c1ee
24-3: Fix EvWrite to release memory correctly (#9841)
snaury Sep 27, 2024
6d3ecc4
[KQP] Multiset explain bug fix (#9866)
pashandor789 Sep 27, 2024
25a1798
Set EnableUniqConstraint by default (#8180) (#9806)
dcherednik Sep 30, 2024
245ae02
Do not fill tables for prepared query on compilation failure (#8210) …
gridnevvvit Sep 30, 2024
d2defe2
[] Disable enable statistics by default (#9899)
pashandor789 Sep 30, 2024
fa7bda7
24-3: Fix GetAliveChildren with filter by type (#9934)
CyberROFL Oct 2, 2024
7431513
[24-3] Fix leaky kind filters in configs dispatcher (#9952)
Enjection Oct 2, 2024
19a3d42
recompilation with query id from compilation result (#9592)
VPolka Oct 2, 2024
7e582fb
Add description of TImmediateControlsConfig.TBlobStorageControllerCon…
serbel324 Oct 2, 2024
5b68ac8
fix potential GetStatistics hanging during rolling update; enable sta…
alexd65536 Oct 3, 2024
d1b7541
24-3: Add reason for pending action in maintenance public API (#3289)…
pixcc Oct 3, 2024
981dfa4
24-3: parse topic's partitioning once and more efficiently, better ha…
uzhastik Oct 7, 2024
0cbf92e
24-3: Add evict vdisks for a rack (#9740) (#10031)
pixcc Oct 3, 2024
6c59a7b
24-3: schemeshard: fix enable_alter_database_create_hive_first mode (…
uzhastik Oct 7, 2024
f2dc5e4
YMQ: a couple of fixes (for stable-24-3) (#10082)
qyryq Oct 5, 2024
4930cef
24-3: optimized batch processing in Topics (#10139)
CyberROFL Oct 6, 2024
03e7469
YMQ: fix ReceiveMessage with attributes (for stable-24-3) (#10144)
qyryq Oct 7, 2024
1d9b01f
UI updates for stable-24-3 (#9928)
adameat Oct 7, 2024
f83a4c6
24-3: Add min delay before shutdown (#9688) (#10087)
pixcc Oct 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions ydb/core/base/board_lookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace NKikimr {
class TBoardLookupActor : public TActorBootstrapped<TBoardLookupActor> {
const TString Path;
const TActorId Owner;
const ui64 Cookie;
const EBoardLookupMode Mode;
const bool Subscriber;
TBoardRetrySettings BoardRetrySettings;
Expand Down Expand Up @@ -111,12 +112,12 @@ class TBoardLookupActor : public TActorBootstrapped<TBoardLookupActor> {
void NotAvailable() {
if (CurrentStateFunc() != &TThis::StateSubscribe) {
Send(Owner, new TEvStateStorage::TEvBoardInfo(
TEvStateStorage::TEvBoardInfo::EStatus::NotAvailable, Path));
TEvStateStorage::TEvBoardInfo::EStatus::NotAvailable, Path), 0, Cookie);
} else {
Send(Owner,
new TEvStateStorage::TEvBoardInfoUpdate(
TEvStateStorage::TEvBoardInfo::EStatus::NotAvailable, Path
)
), 0, Cookie
);
}
return PassAway();
Expand All @@ -129,7 +130,7 @@ class TBoardLookupActor : public TActorBootstrapped<TBoardLookupActor> {
auto reply = MakeHolder<TEvStateStorage::TEvBoardInfo>(
TEvStateStorage::TEvBoardInfo::EStatus::Ok, Path);
reply->InfoEntries = std::move(Info);
Send(Owner, std::move(reply));
Send(Owner, std::move(reply), 0, Cookie);
if (Subscriber) {
Become(&TThis::StateSubscribe);
return;
Expand Down Expand Up @@ -240,7 +241,7 @@ class TBoardLookupActor : public TActorBootstrapped<TBoardLookupActor> {
auto reply = MakeHolder<TEvStateStorage::TEvBoardInfoUpdate>(
TEvStateStorage::TEvBoardInfo::EStatus::Ok, Path);
reply->Updates = { { oid, std::move(update.value()) } };
Send(Owner, std::move(reply));
Send(Owner, std::move(reply), 0, Cookie);
}
} else {
if (info.GetDropped()) {
Expand Down Expand Up @@ -308,7 +309,7 @@ class TBoardLookupActor : public TActorBootstrapped<TBoardLookupActor> {
auto reply = MakeHolder<TEvStateStorage::TEvBoardInfoUpdate>(
TEvStateStorage::TEvBoardInfo::EStatus::Ok, Path);
reply->Updates = std::move(updates);
Send(Owner, std::move(reply));
Send(Owner, std::move(reply), 0, Cookie);
}
}

Expand Down Expand Up @@ -484,7 +485,7 @@ class TBoardLookupActor : public TActorBootstrapped<TBoardLookupActor> {
auto reply = MakeHolder<TEvStateStorage::TEvBoardInfoUpdate>(
TEvStateStorage::TEvBoardInfo::EStatus::Ok, Path);
reply->Updates = std::move(updates);
Send(Owner, std::move(reply));
Send(Owner, std::move(reply), 0, Cookie);
}
}

Expand All @@ -495,9 +496,10 @@ class TBoardLookupActor : public TActorBootstrapped<TBoardLookupActor> {

TBoardLookupActor(
const TString &path, TActorId owner, EBoardLookupMode mode,
TBoardRetrySettings boardRetrySettings)
TBoardRetrySettings boardRetrySettings, ui64 cookie = 0)
: Path(path)
, Owner(owner)
, Cookie(cookie)
, Mode(mode)
, Subscriber(Mode == EBoardLookupMode::Subscription)
, BoardRetrySettings(std::move(boardRetrySettings))
Expand Down Expand Up @@ -545,8 +547,8 @@ class TBoardLookupActor : public TActorBootstrapped<TBoardLookupActor> {

IActor* CreateBoardLookupActor(
const TString &path, const TActorId &owner, EBoardLookupMode mode,
TBoardRetrySettings boardRetrySettings) {
return new TBoardLookupActor(path, owner, mode, std::move(boardRetrySettings));
TBoardRetrySettings boardRetrySettings, ui64 cookie) {
return new TBoardLookupActor(path, owner, mode, std::move(boardRetrySettings), cookie);
}

}
2 changes: 1 addition & 1 deletion ydb/core/base/statestorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ IActor* CreateStateStorageBoardReplica(const TIntrusivePtr<TStateStorageInfo> &,
IActor* CreateSchemeBoardReplica(const TIntrusivePtr<TStateStorageInfo>&, ui32);
IActor* CreateBoardLookupActor(
const TString &path, const TActorId &owner, EBoardLookupMode mode,
TBoardRetrySettings boardRetrySettings = {});
TBoardRetrySettings boardRetrySettings = {}, ui64 cookie = 0);
IActor* CreateBoardPublishActor(
const TString &path, const TString &payload, const TActorId &owner, ui32 ttlMs, bool reg,
TBoardRetrySettings boardRetrySettings = {});
Expand Down
5 changes: 3 additions & 2 deletions ydb/core/blobstorage/pdisk/blobstorage_pdisk_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ void TPDisk::WhiteboardReport(TWhiteboardReport &whiteboardReport) {
TGuard<TMutex> guard(StateMutex);
const ui64 totalSize = Format.DiskSize;
const ui64 availableSize = (ui64)Format.ChunkSize * Keeper.GetFreeChunkCount();

if (*Mon.PDiskBriefState != TPDiskMon::TPDisk::Error) {
*Mon.FreeSpaceBytes = availableSize;
*Mon.UsedSpaceBytes = totalSize - availableSize;
Expand All @@ -1487,7 +1487,7 @@ void TPDisk::WhiteboardReport(TWhiteboardReport &whiteboardReport) {
*Mon.UsedSpaceBytes = 32_KB;
*Mon.TotalSpaceBytes = 32_KB;
}

NKikimrWhiteboard::TPDiskStateInfo& pdiskState = reportResult->PDiskState->Record;
pdiskState.SetPDiskId(PDiskId);
pdiskState.SetPath(Cfg->GetDevicePath());
Expand All @@ -1499,6 +1499,7 @@ void TPDisk::WhiteboardReport(TWhiteboardReport &whiteboardReport) {
pdiskState.SetSystemSize(Format.ChunkSize * (Keeper.GetOwnerHardLimit(OwnerSystemLog) + Keeper.GetOwnerHardLimit(OwnerSystemReserve)));
pdiskState.SetLogUsedSize(Format.ChunkSize * (Keeper.GetOwnerHardLimit(OwnerCommonStaticLog) - Keeper.GetOwnerFree(OwnerCommonStaticLog)));
pdiskState.SetLogTotalSize(Format.ChunkSize * Keeper.GetOwnerHardLimit(OwnerCommonStaticLog));
pdiskState.SetNumActiveSlots(TotalOwners);
if (ExpectedSlotCount) {
pdiskState.SetExpectedSlotCount(ExpectedSlotCount);
}
Expand Down
16 changes: 14 additions & 2 deletions ydb/core/change_exchange/change_sender_common_ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,10 @@ class TBaseChangeSender {
}

TActorId GetChangeServer() const { return ChangeServer; }
void CreateSenders(const TVector<ui64>& partitionIds, bool partitioningChanged = true) {
if (partitioningChanged) {

private:
void CreateSendersImpl(const TVector<ui64>& partitionIds) {
if (partitionIds) {
CreateMissingSenders(partitionIds);
} else {
RecreateSenders(GonePartitions);
Expand All @@ -427,6 +429,16 @@ class TBaseChangeSender {
}
}

protected:
void CreateSenders(const TVector<ui64>& partitionIds) {
Y_ABORT_UNLESS(partitionIds);
CreateSendersImpl(partitionIds);
}

void CreateSenders() {
CreateSendersImpl({});
}

void KillSenders() {
for (const auto& [_, sender] : std::exchange(Senders, {})) {
if (sender.ActorId) {
Expand Down
15 changes: 15 additions & 0 deletions ydb/core/change_exchange/util.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#include "util.h"

namespace NKikimr::NChangeExchange {

TVector<ui64> MakePartitionIds(const TVector<TKeyDesc::TPartitionInfo>& partitions) {
TVector<ui64> result(::Reserve(partitions.size()));

for (const auto& partition : partitions) {
result.push_back(partition.ShardId);
}

return result;
}

}
9 changes: 9 additions & 0 deletions ydb/core/change_exchange/util.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#pragma once

#include <ydb/core/scheme/scheme_tabledefs.h>

namespace NKikimr::NChangeExchange {

TVector<ui64> MakePartitionIds(const TVector<TKeyDesc::TPartitionInfo>& partitions);

}
1 change: 1 addition & 0 deletions ydb/core/change_exchange/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SRCS(
change_exchange.cpp
change_record.cpp
change_sender_monitoring.cpp
util.cpp
)

GENERATE_ENUM_SERIALIZATION(change_record.h)
Expand Down
24 changes: 23 additions & 1 deletion ydb/core/cms/api_adapters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,33 @@ namespace {
}
}

Ydb::Maintenance::ActionState::ActionReason ConvertReason(NKikimrCms::TAction::TIssue::EType cmsActionIssueType) {
using EIssueType = NKikimrCms::TAction::TIssue;
switch (cmsActionIssueType) {
case EIssueType::UNKNOWN:
return Ydb::Maintenance::ActionState::ACTION_REASON_UNSPECIFIED;
case EIssueType::GENERIC:
return Ydb::Maintenance::ActionState::ACTION_REASON_GENERIC;
case EIssueType::TOO_MANY_UNAVAILABLE_VDISKS:
return Ydb::Maintenance::ActionState::ACTION_REASON_TOO_MANY_UNAVAILABLE_VDISKS;
case EIssueType::TOO_MANY_UNAVAILABLE_STATE_STORAGE_RINGS:
return Ydb::Maintenance::ActionState::ACTION_REASON_TOO_MANY_UNAVAILABLE_STATE_STORAGE_RINGS;
case EIssueType::DISABLED_NODES_LIMIT_REACHED:
return Ydb::Maintenance::ActionState::ACTION_REASON_DISABLED_NODES_LIMIT_REACHED;
case EIssueType::TENANT_DISABLED_NODES_LIMIT_REACHED:
return Ydb::Maintenance::ActionState::ACTION_REASON_TENANT_DISABLED_NODES_LIMIT_REACHED;
case EIssueType::SYS_TABLETS_NODE_LIMIT_REACHED:
return Ydb::Maintenance::ActionState::ACTION_REASON_SYS_TABLETS_NODE_LIMIT_REACHED;
}
return Ydb::Maintenance::ActionState::ACTION_REASON_UNSPECIFIED;
}

void ConvertAction(const NKikimrCms::TAction& cmsAction, Ydb::Maintenance::ActionState& actionState) {
ConvertAction(cmsAction, *actionState.mutable_action()->mutable_lock_action());
// FIXME: specify action_uid
actionState.set_status(Ydb::Maintenance::ActionState::ACTION_STATUS_PENDING);
actionState.set_reason(Ydb::Maintenance::ActionState::ACTION_REASON_UNSPECIFIED); // FIXME: specify
actionState.set_reason(ConvertReason(cmsAction.GetIssue().GetType()));
actionState.set_reason_details(cmsAction.GetIssue().GetMessage());
}

void ConvertActionUid(const TString& taskUid, const TString& permissionId,
Expand Down
7 changes: 0 additions & 7 deletions ydb/core/cms/cluster_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ using TClusterInfoPtr = TIntrusivePtr<TClusterInfo>;
struct TCmsState;
using TCmsStatePtr = TIntrusivePtr<TCmsState>;

struct TErrorInfo {
NKikimrCms::TStatus::ECode Code = NKikimrCms::TStatus::ALLOW;
TString Reason;
TInstant Deadline;
ui64 RollbackPoint = 0;
};

/**
* Structure to hold info about issued permission. A set of
* all issued permissions is a part of CMS persistent state.
Expand Down
Loading
Loading