aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkruall <kruall@yandex-team.ru>2022-03-18 00:08:28 +0300
committerkruall <kruall@yandex-team.ru>2022-03-18 00:08:28 +0300
commit4d8a37831e1a5889237ca5105271ce8d7f168979 (patch)
treee3d387d6e576687b33d42c305e03dfe93292ef62
parenta0ce4dbdf48ad6496fc9577d1e22e32ed8d4235c (diff)
downloadydb-4d8a37831e1a5889237ca5105271ce8d7f168979.tar.gz
Rename methods by corrections from support, KIKIMR-13253
ref:a2f70d285fe8d8fb4e90ba22126343fa52f6b9ce
-rw-r--r--ydb/core/keyvalue/keyvalue_events.h40
-rw-r--r--ydb/core/keyvalue/keyvalue_flat_impl.h12
-rw-r--r--ydb/core/keyvalue/keyvalue_intermediate.h2
-rw-r--r--ydb/core/keyvalue/keyvalue_state.cpp42
-rw-r--r--ydb/core/keyvalue/keyvalue_state.h10
-rw-r--r--ydb/core/keyvalue/keyvalue_ut.cpp4
-rw-r--r--ydb/core/keyvalue/protos/events.proto16
7 files changed, 63 insertions, 63 deletions
diff --git a/ydb/core/keyvalue/keyvalue_events.h b/ydb/core/keyvalue/keyvalue_events.h
index 03bc81ad8f..259d5d1a6f 100644
--- a/ydb/core/keyvalue/keyvalue_events.h
+++ b/ydb/core/keyvalue/keyvalue_events.h
@@ -27,16 +27,16 @@ struct TEvKeyValue {
EvRead = EvRequest + 16,
EvReadRange,
EvExecuteTransaction,
- EvGetStatus,
- EvObtainLock,
+ EvGetBlobStorageChannelStatus,
+ EvAcquireLock,
EvResponse = EvRequest + 512,
EvReadResponse = EvResponse + 16,
EvReadRangeResponse,
EvExecuteTransactionResponse,
- EvGetStatusResponse,
- EvObtainLockResponse,
+ EvGetBlobStorageChannelStatusResponse,
+ EvAcquireLockResponse,
EvEnd
};
@@ -87,32 +87,32 @@ struct TEvKeyValue {
TEvExecuteTransactionResponse() { }
};
- struct TEvGetStatusResponse;
+ struct TEvGetBlobStorageChannelStatusResponse;
- struct TEvGetStatus : public TEventPB<TEvGetStatus,
- NKikimrKeyValue::GetStatusRequest, EvGetStatus> {
+ struct TEvGetBlobStorageChannelStatus : public TEventPB<TEvGetBlobStorageChannelStatus,
+ NKikimrKeyValue::GetBlobStorageChannelStatusRequest, EvGetBlobStorageChannelStatus> {
- using TResponse = TEvGetStatusResponse;
- TEvGetStatus() { }
+ using TResponse = TEvGetBlobStorageChannelStatusResponse;
+ TEvGetBlobStorageChannelStatus() { }
};
- struct TEvGetStatusResponse : public TEventPB<TEvGetStatusResponse,
- NKikimrKeyValue::GetStatusResult, EvGetStatusResponse> {
- TEvGetStatusResponse() { }
+ struct TEvGetBlobStorageChannelStatusResponse : public TEventPB<TEvGetBlobStorageChannelStatusResponse,
+ NKikimrKeyValue::GetBlobStorageChannelStatusResult, EvGetBlobStorageChannelStatusResponse> {
+ TEvGetBlobStorageChannelStatusResponse() { }
};
- struct TEvObtainLockResponse;
+ struct TEvAcquireLockResponse;
- struct TEvObtainLock : public TEventPB<TEvObtainLock,
- NKikimrKeyValue::ObtainLockRequest, EvObtainLock> {
+ struct TEvAcquireLock : public TEventPB<TEvAcquireLock,
+ NKikimrKeyValue::AcquireLockRequest, EvAcquireLock> {
- using TResponse = TEvObtainLockResponse;
- TEvObtainLock() { }
+ using TResponse = TEvAcquireLockResponse;
+ TEvAcquireLock() { }
};
- struct TEvObtainLockResponse : public TEventPB<TEvObtainLockResponse,
- NKikimrKeyValue::ObtainLockResult, EvObtainLockResponse> {
- TEvObtainLockResponse() { }
+ struct TEvAcquireLockResponse : public TEventPB<TEvAcquireLockResponse,
+ NKikimrKeyValue::AcquireLockResult, EvAcquireLockResponse> {
+ TEvAcquireLockResponse() { }
};
struct TEvRequest : public TEventPB<TEvRequest,
diff --git a/ydb/core/keyvalue/keyvalue_flat_impl.h b/ydb/core/keyvalue/keyvalue_flat_impl.h
index 292f2feff9..db18dad566 100644
--- a/ydb/core/keyvalue/keyvalue_flat_impl.h
+++ b/ydb/core/keyvalue/keyvalue_flat_impl.h
@@ -293,12 +293,12 @@ protected:
State.OnEvExecuteTransaction(ev, TActivationContext::AsActorContext(), Info());
}
- void Handle(TEvKeyValue::TEvGetStatus::TPtr &ev) {
- State.OnEvGetStatus(ev, TActivationContext::AsActorContext(), Info());
+ void Handle(TEvKeyValue::TEvGetBlobStorageChannelStatus::TPtr &ev) {
+ State.OnEvGetBlobStorageChannelStatus(ev, TActivationContext::AsActorContext(), Info());
}
- void Handle(TEvKeyValue::TEvObtainLock::TPtr &ev) {
- State.OnEvObtainLock(ev, TActivationContext::AsActorContext(), Info());
+ void Handle(TEvKeyValue::TEvAcquireLock::TPtr &ev) {
+ State.OnEvAcquireLock(ev, TActivationContext::AsActorContext(), Info());
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -472,8 +472,8 @@ public:
hFunc(TEvKeyValue::TEvRead, Handle);
hFunc(TEvKeyValue::TEvReadRange, Handle);
hFunc(TEvKeyValue::TEvExecuteTransaction, Handle);
- hFunc(TEvKeyValue::TEvGetStatus, Handle);
- hFunc(TEvKeyValue::TEvObtainLock, Handle);
+ hFunc(TEvKeyValue::TEvGetBlobStorageChannelStatus, Handle);
+ hFunc(TEvKeyValue::TEvAcquireLock, Handle);
HFunc(TEvKeyValue::TEvEraseCollect, Handle);
HFunc(TEvKeyValue::TEvCollect, Handle);
diff --git a/ydb/core/keyvalue/keyvalue_intermediate.h b/ydb/core/keyvalue/keyvalue_intermediate.h
index 38698a9c73..33f5dbb8eb 100644
--- a/ydb/core/keyvalue/keyvalue_intermediate.h
+++ b/ydb/core/keyvalue/keyvalue_intermediate.h
@@ -152,7 +152,7 @@ struct TIntermediate {
NKikimrClient::TResponse Response;
NKikimrKeyValue::ExecuteTransactionResult ExecuteTransactionResponse;
- NKikimrKeyValue::GetStatusResult GetStatusResponse;
+ NKikimrKeyValue::GetBlobStorageChannelStatusResult GetBlobStorageChannelStatusResponse;
THashMap<ui32, NKikimrKeyValue::Channel*> Channels;
diff --git a/ydb/core/keyvalue/keyvalue_state.cpp b/ydb/core/keyvalue/keyvalue_state.cpp
index 11f1ba55a2..8ca548d9bd 100644
--- a/ydb/core/keyvalue/keyvalue_state.cpp
+++ b/ydb/core/keyvalue/keyvalue_state.cpp
@@ -868,14 +868,14 @@ void TKeyValueState::Reply(THolder<TIntermediate> &intermediate, const TActorCon
ResourceMetrics->Network.Increment(response->Record.ByteSize());
ctx.Send(intermediate->RespondTo, response.Release());
}
- if (intermediate->EvType == TEvKeyValue::TEvGetStatus::EventType) {
- THolder<TEvKeyValue::TEvGetStatusResponse> response(new TEvKeyValue::TEvGetStatusResponse);
- response->Record = intermediate->GetStatusResponse;
+ if (intermediate->EvType == TEvKeyValue::TEvGetBlobStorageChannelStatus::EventType) {
+ THolder<TEvKeyValue::TEvGetBlobStorageChannelStatusResponse> response(new TEvKeyValue::TEvGetBlobStorageChannelStatusResponse);
+ response->Record = intermediate->GetBlobStorageChannelStatusResponse;
ResourceMetrics->Network.Increment(response->Record.ByteSize());
ctx.Send(intermediate->RespondTo, response.Release());
}
- if (intermediate->EvType == TEvKeyValue::TEvObtainLock::EventType) {
- THolder<TEvKeyValue::TEvObtainLockResponse> response(new TEvKeyValue::TEvObtainLockResponse);
+ if (intermediate->EvType == TEvKeyValue::TEvAcquireLock::EventType) {
+ THolder<TEvKeyValue::TEvAcquireLockResponse> response(new TEvKeyValue::TEvAcquireLockResponse);
response->Record.set_lock_generation(StoredState.GetUserGeneration());
response->Record.set_cookie(intermediate->Cookie);
ResourceMetrics->Network.Increment(response->Record.ByteSize());
@@ -1256,8 +1256,8 @@ void TKeyValueState::CmdGetStatus(THolder<TIntermediate> &intermediate, ISimpleD
response.SetStatus(request.Status);
response.SetStorageChannel(request.StorageChannel);
response.SetStatusFlags(request.StatusFlags.Raw);
- } else if ((intermediate->EvType == TEvKeyValue::TEvGetStatus::EventType)) {
- auto response = intermediate->GetStatusResponse.add_channel();
+ } else if ((intermediate->EvType == TEvKeyValue::TEvGetBlobStorageChannelStatus::EventType)) {
+ auto response = intermediate->GetBlobStorageChannelStatusResponse.add_channel();
if (request.Status == NKikimrProto::OK) {
response->set_status(NKikimrKeyValue::Statuses::RSTATUS_OK);
@@ -1276,7 +1276,7 @@ void TKeyValueState::CmdGetStatus(THolder<TIntermediate> &intermediate, ISimpleD
SetStatusFlags(response->mutable_status_flags(), request.StatusFlags);
}
}
- intermediate->GetStatusResponse.set_status(NKikimrKeyValue::Statuses::RSTATUS_OK);
+ intermediate->GetBlobStorageChannelStatusResponse.set_status(NKikimrKeyValue::Statuses::RSTATUS_OK);
}
void TKeyValueState::CmdCopyRange(THolder<TIntermediate>& intermediate, ISimpleDb& db, const TActorContext& ctx) {
@@ -2742,12 +2742,12 @@ TKeyValueState::TPrepareResult TKeyValueState::PrepareOneGetStatus(TIntermediate
}
-bool TKeyValueState::PrepareGetStatusRequest(const TActorContext &ctx, TEvKeyValue::TEvGetStatus::TPtr &ev,
+bool TKeyValueState::PrepareGetBlobStorageChannelStatusRequest(const TActorContext &ctx, TEvKeyValue::TEvGetBlobStorageChannelStatus::TPtr &ev,
THolder<TIntermediate> &intermediate, const TTabletStorageInfo *info)
{
- LOG_DEBUG_S(ctx, NKikimrServices::KEYVALUE, "KeyValue# " << TabletId << " PrepareGetStatusRequest Marker# KV78");
+ LOG_DEBUG_S(ctx, NKikimrServices::KEYVALUE, "KeyValue# " << TabletId << " PrepareGetBlobStorageChannelStatusRequest Marker# KV78");
- NKikimrKeyValue::GetStatusRequest &request = ev->Get()->Record;
+ NKikimrKeyValue::GetBlobStorageChannelStatusRequest &request = ev->Get()->Record;
StoredState.SetChannelGeneration(ExecutorGeneration);
StoredState.SetChannelStep(NextLogoBlobStep - 1);
@@ -2758,7 +2758,7 @@ bool TKeyValueState::PrepareGetStatusRequest(const TActorContext &ctx, TEvKeyVal
intermediate->RequestUid = NextRequestUid;
++NextRequestUid;
RequestInputTime[intermediate->RequestUid] = TAppData::TimeProvider->Now();
- intermediate->EvType = TEvKeyValue::TEvGetStatus::EventType;
+ intermediate->EvType = TEvKeyValue::TEvGetBlobStorageChannelStatus::EventType;
if (CheckDeadline(ctx, ev->Get(), intermediate)) {
return false;
@@ -2778,10 +2778,10 @@ bool TKeyValueState::PrepareGetStatusRequest(const TActorContext &ctx, TEvKeyVal
return true;
}
-bool TKeyValueState::PrepareObtainLockRequest(const TActorContext &ctx, TEvKeyValue::TEvObtainLock::TPtr &ev,
+bool TKeyValueState::PrepareAcquireLockRequest(const TActorContext &ctx, TEvKeyValue::TEvAcquireLock::TPtr &ev,
THolder<TIntermediate> &intermediate)
{
- LOG_DEBUG_S(ctx, NKikimrServices::KEYVALUE, "KeyValue# " << TabletId << " PrepareObtainLockRequest Marker# KV79");
+ LOG_DEBUG_S(ctx, NKikimrServices::KEYVALUE, "KeyValue# " << TabletId << " PrepareAcquireLockRequest Marker# KV79");
StoredState.SetChannelGeneration(ExecutorGeneration);
StoredState.SetChannelStep(NextLogoBlobStep - 1);
@@ -2793,7 +2793,7 @@ bool TKeyValueState::PrepareObtainLockRequest(const TActorContext &ctx, TEvKeyVa
intermediate->RequestUid = NextRequestUid;
++NextRequestUid;
RequestInputTime[intermediate->RequestUid] = TAppData::TimeProvider->Now();
- intermediate->EvType = TEvKeyValue::TEvObtainLock::EventType;
+ intermediate->EvType = TEvKeyValue::TEvAcquireLock::EventType;
intermediate->HasIncrementGeneration = true;
return true;
}
@@ -2923,7 +2923,7 @@ void TKeyValueState::OnEvExecuteTransaction(TEvKeyValue::TEvExecuteTransaction::
}
}
-void TKeyValueState::OnEvGetStatus(TEvKeyValue::TEvGetStatus::TPtr &ev, const TActorContext &ctx,
+void TKeyValueState::OnEvGetBlobStorageChannelStatus(TEvKeyValue::TEvGetBlobStorageChannelStatus::TPtr &ev, const TActorContext &ctx,
const TTabletStorageInfo *info)
{
THolder<TIntermediate> intermediate;
@@ -2934,10 +2934,10 @@ void TKeyValueState::OnEvGetStatus(TEvKeyValue::TEvGetStatus::TPtr &ev, const TA
TRequestType::EType requestType = TRequestType::ReadOnlyInline;
CountRequestIncoming(requestType);
- if (PrepareGetStatusRequest(ctx, ev, intermediate, info)) {
+ if (PrepareGetBlobStorageChannelStatusRequest(ctx, ev, intermediate, info)) {
++InFlightForStep[StoredState.GetChannelStep()];
LOG_DEBUG_S(ctx, NKikimrServices::KEYVALUE, "KeyValue# " << TabletId
- << " Create GetStatus request, Marker# KV75");
+ << " Create GetBlobStorageChannelStatus request, Marker# KV75");
RegisterRequestActor(ctx, std::move(intermediate), info);
++RoInlineIntermediatesInFlight;
CountRequestTakeOffOrEnqueue(requestType);
@@ -2947,7 +2947,7 @@ void TKeyValueState::OnEvGetStatus(TEvKeyValue::TEvGetStatus::TPtr &ev, const TA
}
}
-void TKeyValueState::OnEvObtainLock(TEvKeyValue::TEvObtainLock::TPtr &ev, const TActorContext &ctx,
+void TKeyValueState::OnEvAcquireLock(TEvKeyValue::TEvAcquireLock::TPtr &ev, const TActorContext &ctx,
const TTabletStorageInfo *info)
{
THolder<TIntermediate> intermediate;
@@ -2958,10 +2958,10 @@ void TKeyValueState::OnEvObtainLock(TEvKeyValue::TEvObtainLock::TPtr &ev, const
TRequestType::EType requestType = TRequestType::ReadOnlyInline;
CountRequestIncoming(requestType);
- if (PrepareObtainLockRequest(ctx, ev, intermediate)) {
+ if (PrepareAcquireLockRequest(ctx, ev, intermediate)) {
++InFlightForStep[StoredState.GetChannelStep()];
LOG_DEBUG_S(ctx, NKikimrServices::KEYVALUE, "KeyValue# " << TabletId
- << " Create ObtainLock request, Marker# KV80");
+ << " Create AcquireLock request, Marker# KV80");
RegisterRequestActor(ctx, std::move(intermediate), info);
++RoInlineIntermediatesInFlight;
CountRequestTakeOffOrEnqueue(requestType);
diff --git a/ydb/core/keyvalue/keyvalue_state.h b/ydb/core/keyvalue/keyvalue_state.h
index 312a2115cf..b18a7c8bae 100644
--- a/ydb/core/keyvalue/keyvalue_state.h
+++ b/ydb/core/keyvalue/keyvalue_state.h
@@ -423,9 +423,9 @@ public:
const TTabletStorageInfo *info);
void OnEvExecuteTransaction(TEvKeyValue::TEvExecuteTransaction::TPtr &ev, const TActorContext &ctx,
const TTabletStorageInfo *info);
- void OnEvGetStatus(TEvKeyValue::TEvGetStatus::TPtr &ev, const TActorContext &ctx,
+ void OnEvGetBlobStorageChannelStatus(TEvKeyValue::TEvGetBlobStorageChannelStatus::TPtr &ev, const TActorContext &ctx,
const TTabletStorageInfo *info);
- void OnEvObtainLock(TEvKeyValue::TEvObtainLock::TPtr &ev, const TActorContext &ctx,
+ void OnEvAcquireLock(TEvKeyValue::TEvAcquireLock::TPtr &ev, const TActorContext &ctx,
const TTabletStorageInfo *info);
void OnPeriodicRefresh(const TActorContext &ctx);
@@ -555,7 +555,7 @@ public:
response->Record.set_requested_size(interRead.ValueSize);
response->Record.set_requested_key(interRead.Key);
}
- if constexpr (!std::is_same_v<TResponse, TEvKeyValue::TEvGetStatusResponse>) {
+ if constexpr (!std::is_same_v<TResponse, TEvKeyValue::TEvGetBlobStorageChannelStatusResponse>) {
if (intermediate->HasCookie) {
response->Record.set_cookie(intermediate->Cookie);
}
@@ -587,9 +587,9 @@ public:
THolder<TIntermediate> &intermediate, const TTabletStorageInfo *info);
TPrepareResult PrepareOneGetStatus(TIntermediate::TGetStatus &cmd, ui64 publicStorageChannel,
const TTabletStorageInfo *info);
- bool PrepareGetStatusRequest(const TActorContext &ctx, TEvKeyValue::TEvGetStatus::TPtr &ev,
+ bool PrepareGetBlobStorageChannelStatusRequest(const TActorContext &ctx, TEvKeyValue::TEvGetBlobStorageChannelStatus::TPtr &ev,
THolder<TIntermediate> &intermediate, const TTabletStorageInfo *info);
- bool PrepareObtainLockRequest(const TActorContext &ctx, TEvKeyValue::TEvObtainLock::TPtr &ev,
+ bool PrepareAcquireLockRequest(const TActorContext &ctx, TEvKeyValue::TEvAcquireLock::TPtr &ev,
THolder<TIntermediate> &intermediate);
template <typename TRequestType>
diff --git a/ydb/core/keyvalue/keyvalue_ut.cpp b/ydb/core/keyvalue/keyvalue_ut.cpp
index 4ae1fcf56a..fae1ce2150 100644
--- a/ydb/core/keyvalue/keyvalue_ut.cpp
+++ b/ydb/core/keyvalue/keyvalue_ut.cpp
@@ -791,7 +791,7 @@ void ExecuteReadRange(TTestContext &tc,
template <NKikimrKeyValue::Statuses::ReplyStatus ExpectedStatus = NKikimrKeyValue::Statuses::RSTATUS_OK>
void ExecuteGetStatus(TTestContext &tc, const TDeque<ui32> &channels, ui64 lock_generation) {
- TDesiredPair<TEvKeyValue::TEvGetStatus> dp;
+ TDesiredPair<TEvKeyValue::TEvGetBlobStorageChannelStatus> dp;
dp.Request.set_lock_generation(lock_generation);
dp.Request.set_tablet_id(tc.TabletId);
for (ui32 channel : channels) {
@@ -811,7 +811,7 @@ void ExecuteGetStatus(TTestContext &tc, const TDeque<ui32> &channels, ui64 lock_
}
void ExecuteObtainLock(TTestContext &tc, ui64 expectedLockGeneration) {
- TDesiredPair<TEvKeyValue::TEvObtainLock> dp;
+ TDesiredPair<TEvKeyValue::TEvAcquireLock> dp;
dp.Request.set_tablet_id(tc.TabletId);
ExecuteEvent(dp, tc);
UNIT_ASSERT_VALUES_EQUAL(dp.Response.lock_generation(), expectedLockGeneration);
diff --git a/ydb/core/keyvalue/protos/events.proto b/ydb/core/keyvalue/protos/events.proto
index fa365981ae..fe91118cc3 100644
--- a/ydb/core/keyvalue/protos/events.proto
+++ b/ydb/core/keyvalue/protos/events.proto
@@ -49,13 +49,13 @@ message Channel {
message KVRange {
oneof from_bound {
- bytes from_key_inclusive = 1;
- bytes from_key_exclusive = 2;
+ string from_key_inclusive = 1;
+ string from_key_exclusive = 2;
}
oneof to_bound {
- bytes to_key_inclusive = 3;
- bytes to_key_exclusive = 4;
+ string to_key_inclusive = 3;
+ string to_key_exclusive = 4;
}
}
@@ -166,25 +166,25 @@ message ExecuteTransactionResult {
uint64 cookie = 4;
}
-message GetStatusRequest {
+message GetBlobStorageChannelStatusRequest {
uint64 tablet_id = 1;
uint64 lock_generation = 2;
repeated uint32 storage_channel = 3;
uint64 deadline_instant_ms = 4;
}
-message GetStatusResult {
+message GetBlobStorageChannelStatusResult {
repeated Channel channel = 1;
Statuses.ReplyStatus status = 2;
string msg = 3;
}
-message ObtainLockRequest {
+message AcquireLockRequest {
uint64 tablet_id = 1;
uint64 cookie = 2;
}
-message ObtainLockResult {
+message AcquireLockResult {
uint64 lock_generation = 1;
uint64 cookie = 2;
}