Skip to content

Commit

Permalink
Some minor KeyValue tablet improvements (merge from main #1900) (#4644)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvru authored May 17, 2024
1 parent 6e76cc8 commit 82d69fe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ydb/core/keyvalue/channel_balancer.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ namespace NKikimr::NKeyValue {
const size_t index = (LatencyQueue.size() - 1) * 99 / 100;
const TDuration perc = latencies[index];
weight = MeanExpectedLatency.GetValue() * weight / Max(perc, TDuration::MilliSeconds(1)).GetValue();
Y_DEBUG_ABORT_UNLESS(weight);
//Y_DEBUG_ABORT_UNLESS(weight);
if (!weight) {
weight = 1;
}
Expand Down
3 changes: 3 additions & 0 deletions ydb/core/keyvalue/keyvalue_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,9 @@ void TKeyValueState::InitExecute(ui64 tabletId, TActorId keyValueActorId, ui32 e
}

THelpers::DbEraseCollect(db, ctx);
if (IsEmptyDbStart) {
THelpers::DbUpdateState(StoredState, db, ctx);
}

// corner case, if no CollectGarbage events were sent
if (InitialCollectsSent == 0) {
Expand Down
5 changes: 5 additions & 0 deletions ydb/core/keyvalue/keyvalue_storage_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,11 @@ class TKeyValueStorageRequest : public TActorBootstrapped<TKeyValueStorageReques
IntermediateResults->Stat.GroupReadIops[std::make_pair(response.Id.Channel(), groupId)] += 1; // FIXME: count distinct blobs?
read.Value.Write(readItem.ValueOffset, std::move(response.Buffer));
} else {
Y_VERIFY_DEBUG_S(response.Status != NKikimrProto::NODATA, "NODATA received for TEvGet"
<< " TabletId# " << TabletInfo->TabletID
<< " Id# " << response.Id
<< " Key# " << read.Key);

TStringStream err;
if (read.Message.size()) {
err << read.Message << Endl;
Expand Down

0 comments on commit 82d69fe

Please sign in to comment.