Skip to content

Commit

Permalink
Remake on data erasure manager
Browse files Browse the repository at this point in the history
  • Loading branch information
molotkov-and committed Feb 19, 2025
1 parent 77a0603 commit b64d497
Show file tree
Hide file tree
Showing 23 changed files with 1,995 additions and 1,092 deletions.
6 changes: 6 additions & 0 deletions ydb/core/blobstorage/base/blobstorage_shred_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ namespace NKikimr {
struct TEvBlobStorage::TEvControllerShredResponse : TEventPB<TEvControllerShredResponse,
NKikimrBlobStorage::TEvControllerShredResponse, TEvBlobStorage::EvControllerShredResponse> {
TEvControllerShredResponse() = default;

TEvControllerShredResponse(ui64 generation, bool completed, ui32 progress) {
Record.SetCurrentGeneration(generation);
Record.SetCompleted(completed);
Record.SetProgress10k(progress);
}
};

}
1 change: 1 addition & 0 deletions ydb/core/protos/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1967,6 +1967,7 @@ message TDataErasureConfig {
// Every 10 m do request to BSC
optional uint64 BlobStorageControllerRequestIntervalSeconds = 5 [default = 600];
optional TTenantDataErasureConfig TenantDataErasureConfig = 6;
optional bool ForceManualStartup = 7 [default = false];
}

message TGraphConfig {
Expand Down
7 changes: 5 additions & 2 deletions ydb/core/protos/counters_schemeshard.proto
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,11 @@ enum ETxTypes {
TXTYPE_LIST_USERS = 90 [(TxTypeOpts) = {Name: "TxListUsers"}];
TXTYPE_UNMARK_RESTORE_TABLES = 91 [(TxTypeOpts) = {Name: "TxUnmarkRestoreTables"}];

TXTYPE_RUN_TENANT_DATA_ERASURE = 92 [(TxTypeOpts) = {Name: "TxRunTenantDataErasure"}];
TXTYPE_DATA_ERASURE_INIT = 92 [(TxTypeOpts) = {Name: "TxDataErasureInit"}];
TXTYPE_RUN_DATA_ERASURE = 93 [(TxTypeOpts) = {Name: "TxRunDataErasure"}];
TXTYPE_RUN_DATA_ERASURE_TENANT = 94 [(TxTypeOpts) = {Name: "TxRunTenantDataErasure"}];

TXTYPE_COMPLETE_DATA_ERASURE = 94 [(TxTypeOpts) = {Name: "TxCompleteDataErasure"}];
TXTYPE_COMPLETE_DATA_ERASURE_SHARD = 95 [(TxTypeOpts) = {Name: "TxCompleteDataErasureShard"}];
TXTYPE_COMPLETE_DATA_ERASURE_TENANT = 96 [(TxTypeOpts) = {Name: "TxCompleteDataErasureTenant"}];
TXTYPE_COMPLETE_DATA_ERASURE_BSC = 97 [(TxTypeOpts) = {Name: "TxCompleteDataErasureBSC"}];
}
3 changes: 3 additions & 0 deletions ydb/core/protos/flat_tx_scheme.proto
Original file line number Diff line number Diff line change
Expand Up @@ -472,3 +472,6 @@ message TEvDataErasureInfoResponse {
optional EStatus Status = 1;
optional uint64 Generation = 2;
}

message TEvDataErasureManualStartupRequest {
}
14 changes: 3 additions & 11 deletions ydb/core/tx/schemeshard/schemeshard.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@ namespace TEvSchemeShard {
EvWakeupToRunDataErasure,
EvMeasureDataErasureBSC,
EvWakeupToRunDataErasureBSC,
EvRunDataErasure,
EvCompleteDataErasure,
EvDataErasureInfoRequest,
EvDataErasureInfoResponse,
EvDataErasureManualStartupRequest,

EvEnd
};
Expand Down Expand Up @@ -689,16 +689,6 @@ namespace TEvSchemeShard {
TEvListUsersResult() = default;
};

struct TEvRunDataErasure : TEventLocal<TEvRunDataErasure, EvRunDataErasure> {
const ui64 Generation;
const TInstant StartTime;

TEvRunDataErasure(ui64 generation, const TInstant& startTime)
: Generation(generation)
, StartTime(startTime)
{}
};

struct TEvTenantDataErasureRequest : TEventPB<TEvTenantDataErasureRequest, NKikimrScheme::TEvTenantDataErasureRequest, EvTenantDataErasureRequest> {
TEvTenantDataErasureRequest() = default;

Expand Down Expand Up @@ -768,6 +758,8 @@ namespace TEvSchemeShard {
}
}
};

struct TEvDataErasureManualStartupRequest : TEventPB<TEvDataErasureManualStartupRequest, NKikimrScheme::TEvDataErasureManualStartupRequest, EvDataErasureManualStartupRequest> {};
};

}
Expand Down
Loading

0 comments on commit b64d497

Please sign in to comment.