Skip to content

Commit 813afdd

Browse files
Remove implicit casts from nullptr to TString (#9262)
1 parent ae06bc8 commit 813afdd

File tree

13 files changed

+30
-31
lines changed

13 files changed

+30
-31
lines changed

ydb/core/blobstorage/pdisk/blobstorage_pdisk_impl.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ void TPDisk::AskVDisksToCutLogs(TOwner ownerFilter, bool doForce) {
729729
data.LogChunkCountBeforeCut = ownedLogChunks;
730730
// ADD_RECORD_WITH_TIMESTAMP_TO_OPERATION_LOG(data.OperationLog, "System owner asked to cut log, OwnerId# " << chunkOwner);
731731
} else {
732-
P_LOG(PRI_INFO, BPD14, "Can't send CutLog",
732+
P_LOG(PRI_INFO, BPD14, "Can't send CutLog",
733733
(OwnerId, ui32(chunkOwner)),
734734
(VDiskId, data.VDiskId.ToStringWOGeneration()));
735735
}
@@ -786,7 +786,7 @@ void TPDisk::AskVDisksToCutLogs(TOwner ownerFilter, bool doForce) {
786786
data.LogChunkCountBeforeCut = ownedLogChunks;
787787
// ADD_RECORD_WITH_TIMESTAMP_TO_OPERATION_LOG(data.OperationLog, "User owner asked to cut log, OwnerId# " << ownerFilter);
788788
} else {
789-
P_LOG(PRI_INFO, BPD14, "Can't send CutLog",
789+
P_LOG(PRI_INFO, BPD14, "Can't send CutLog",
790790
(OwnerId, ui32(ownerFilter)),
791791
(VDiskId, data.VDiskId.ToStringWOGeneration()));
792792
}
@@ -1436,7 +1436,7 @@ void TPDisk::ChunkForget(TChunkForget &evChunkForget) {
14361436
case TChunkState::DATA_DECOMMITTED:
14371437
Y_VERIFY_S(state.CommitsInProgress == 0,
14381438
"PDiskId# " << PCtx->PDiskId << " chunkIdx# " << chunkIdx << " state# " << state.ToString());
1439-
P_LOG(PRI_INFO, BPD01, "chunk was forgotten",
1439+
P_LOG(PRI_INFO, BPD01, "chunk was forgotten",
14401440
(ChunkIdx, chunkIdx),
14411441
(OldOwner, (ui32)state.OwnerId),
14421442
(NewOwner, (ui32)OwnerUnallocated));
@@ -1798,7 +1798,7 @@ bool TPDisk::YardInitForKnownVDisk(TYardInit &evYardInit, TOwner owner) {
17981798
DriveModel.Speed(TDriveModel::OP_TYPE_WRITE), readBlockSize, writeBlockSize,
17991799
DriveModel.BulkWriteBlockSize(), GetUserAccessibleChunkSize(), GetChunkAppendBlockSize(), owner,
18001800
ownerRound, GetStatusFlags(OwnerSystem, evYardInit.OwnerGroupType), ownedChunks,
1801-
Cfg->RetrieveDeviceType(), nullptr));
1801+
Cfg->RetrieveDeviceType(), ""));
18021802
GetStartingPoints(owner, result->StartingPoints);
18031803
ownerData.VDiskId = vDiskId;
18041804
ownerData.CutLogId = evYardInit.CutLogId;
@@ -1948,7 +1948,7 @@ void TPDisk::YardInitFinish(TYardInit &evYardInit) {
19481948
DriveModel.Speed(TDriveModel::OP_TYPE_WRITE), readBlockSize, writeBlockSize,
19491949
DriveModel.BulkWriteBlockSize(), GetUserAccessibleChunkSize(), GetChunkAppendBlockSize(), owner, ownerRound,
19501950
GetStatusFlags(OwnerSystem, evYardInit.OwnerGroupType) | ui32(NKikimrBlobStorage::StatusNewOwner), TVector<TChunkIdx>(),
1951-
Cfg->RetrieveDeviceType(), nullptr));
1951+
Cfg->RetrieveDeviceType(), ""));
19521952
GetStartingPoints(result->PDiskParams->Owner, result->StartingPoints);
19531953
WriteSysLogRestorePoint(new TCompletionEventSender(
19541954
this, evYardInit.Sender, result.Release(), Mon.YardInit.Results), evYardInit.ReqId, {});

ydb/core/blobstorage/pdisk/blobstorage_pdisk_impl_log.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class TLogFlushCompletionAction : public TCompletionAction {
3535

3636
void Exec(TActorSystem *actorSystem) override {
3737
CommonLogger->FirstUncommitted = TFirstUncommitted(EndChunkIdx, EndSectorIdx);
38-
38+
3939
SetUpCompletionLogWrite();
4040
CompletionLogWrite->Exec(actorSystem);
4141

@@ -109,7 +109,7 @@ void TPDisk::InitLogChunksInfo() {
109109
range.IsPresent = false;
110110
Y_ABORT_UNLESS(it->CurrentUserCount > 0);
111111
it->CurrentUserCount--;
112-
P_LOG(PRI_INFO, BPD01, "InitLogChunksInfo, chunk is dereferenced by owner",
112+
P_LOG(PRI_INFO, BPD01, "InitLogChunksInfo, chunk is dereferenced by owner",
113113
(ChunkIdx, it->ChunkIdx),
114114
(LsnRange, TString(TStringBuilder() << "[" << range.FirstLsn << ", " << range.LastLsn << "]")),
115115
(PresentNonces, TString(TStringBuilder() << "[" << it->FirstNonce << ", " << it->LastNonce << "]")),
@@ -942,7 +942,7 @@ void TPDisk::LogWrite(TLogWrite &evLog, TVector<ui32> &logChunksToCommit) {
942942
}
943943
Y_ABORT_UNLESS(CommonLogger->NextChunks.empty());
944944

945-
evLog.Result.Reset(new NPDisk::TEvLogResult(NKikimrProto::OK, GetStatusFlags(OwnerSystem, evLog.OwnerGroupType), nullptr));
945+
evLog.Result.Reset(new NPDisk::TEvLogResult(NKikimrProto::OK, GetStatusFlags(OwnerSystem, evLog.OwnerGroupType), ""));
946946
Y_ABORT_UNLESS(evLog.Result.Get());
947947
evLog.Result->Results.push_back(NPDisk::TEvLogResult::TRecord(evLog.Lsn, evLog.Cookie));
948948
}
@@ -1001,7 +1001,7 @@ NKikimrProto::EReplyStatus TPDisk::BeforeLoggingCommitRecord(const TLogWrite &lo
10011001
if (ChunkState[chunkIdx].CommitState == TChunkState::DATA_RESERVED) {
10021002
Mon.UncommitedDataChunks->Dec();
10031003
Mon.CommitedDataChunks->Inc();
1004-
P_LOG(PRI_INFO, BPD01, "Commit Data Chunk",
1004+
P_LOG(PRI_INFO, BPD01, "Commit Data Chunk",
10051005
(CommitedDataChunks, Mon.CommitedDataChunks->Val()),
10061006
(ChunkIdx, chunkIdx),
10071007
(OwnerId, (ui32)ChunkState[chunkIdx].OwnerId));

ydb/core/blobstorage/pdisk/blobstorage_pdisk_logreader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ TLogReader::TLogReader(bool isInitial,TPDisk *pDisk, TActorSystem * const actorS
294294
, SizeLimit(sizeLimit)
295295
, Result(new NPDisk::TEvReadLogResult(
296296
NKikimrProto::ERROR, position, TLogPosition::Invalid(), false,
297-
pDisk->GetStatusFlags(owner, ownerGroupType), nullptr, owner))
297+
pDisk->GetStatusFlags(owner, ownerGroupType), "", owner))
298298
, ChunkInfo(nullptr)
299299
, Sector(new TDoubleBuffer(pDisk))
300300
, ChunkOwnerMap(IsInitial ? new TMap<ui32, TChunkState>() : nullptr)
@@ -374,7 +374,7 @@ void TLogReader::Exec(ui64 offsetRead, TVector<ui64> &badOffsets, TActorSystem *
374374
bool isOk = RegisterBadOffsets(badOffsets);
375375
if (!isOk) {
376376
P_LOG(PRI_ERROR, BPD01, "Log is damaged and unrevocerable");
377-
377+
378378
ReplyError();
379379
return;
380380
}

ydb/core/blobstorage/pdisk/blobstorage_pdisk_syslogreader.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ TSysLogReader::TSysLogReader(TPDisk *pDisk, TActorSystem *const actorSystem, con
6666
, PCtx(pDisk->PCtx)
6767
, ReqId(reqId)
6868
, Result(new TEvReadLogResult(NKikimrProto::ERROR, TLogPosition{0, 0}, TLogPosition::Invalid(),
69-
true, 0, nullptr, 0))
69+
true, 0, "", 0))
7070
, Cypher(pDisk->Cfg->EnableSectorEncryption)
7171
, SizeToRead(PDisk->Format.SysLogSectorCount * ReplicationFactor * PDisk->Format.SectorSize)
7272
, Data(SizeToRead)
@@ -476,4 +476,3 @@ void TSysLogReader::DumpDebugInfo(TStringStream &str, bool isSingleLine) {
476476

477477
} // NPDisk
478478
} // NKikimr
479-

ydb/core/blobstorage/vdisk/hullop/blobstorage_hull.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ namespace NKikimr {
192192
}
193193

194194
ValidateWriteQuery(ctx, id, writtenBeyondBarrier);
195-
return {NKikimrProto::OK, 0, false};
195+
return {NKikimrProto::OK, "", false};
196196
}
197197

198198
void THull::AddLogoBlob(
@@ -259,7 +259,7 @@ namespace NKikimr {
259259
// allocate lsn in case of success
260260
*seg = Fields->LsnMngr->AllocLsnForHullAndSyncLog();
261261
BlocksCache.UpdateInFlight(tabletID, g, seg->Point());
262-
return {NKikimrProto::OK, 0, false};
262+
return {NKikimrProto::OK, "", false};
263263
case TBlocksCache::EStatus::BLOCKED_PERS:
264264
return {NKikimrProto::ALREADY, "already got", 0, false};
265265
case TBlocksCache::EStatus::BLOCKED_INFLIGH:
@@ -411,7 +411,7 @@ namespace NKikimr {
411411
const bool completeDel = NGc::CompleteDelCmd(collectGeneration, collectStep);
412412

413413
if (!CheckGC(ctx, record))
414-
return {NKikimrProto::ERROR, 0, false}; // record has duplicates
414+
return {NKikimrProto::ERROR, "", false}; // record has duplicates
415415

416416
if (!collect && !record.KeepSize() && !record.DoNotKeepSize()) {
417417
LOG_ERROR_S(ctx, NKikimrServices::BS_HULLRECS, HullDs->HullCtx->VCtx->VDiskLogPrefix

ydb/core/blobstorage/vdisk/skeleton/blobstorage_skeleton.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ namespace NKikimr {
402402
NWilson::TTraceId traceId)
403403
: Buffer(std::move(buffer))
404404
, BlobId(blobId)
405-
, HullStatus({NKikimrProto::UNKNOWN, 0, false})
405+
, HullStatus({NKikimrProto::UNKNOWN, "", false})
406406
, TraceId(std::move(traceId))
407407
{
408408
ExtraBlockChecks.Swap(extraBlockChecks);
@@ -592,7 +592,7 @@ namespace NKikimr {
592592
LOG_ERROR_S(ctx, BS_VDISK_PUT, VCtx->VDiskLogPrefix << "TEvVMultiPut: ingress mismatch;"
593593
<< " id# " << blobId
594594
<< " Marker# BSVS07");
595-
info.HullStatus = {NKikimrProto::ERROR, 0, false};
595+
info.HullStatus = {NKikimrProto::ERROR, "", false};
596596
} else {
597597
info.Ingress = *ingressOpt;
598598
}
@@ -716,7 +716,7 @@ namespace NKikimr {
716716
info.IsHugeBlob = HugeBlobCtx->IsHugeBlob(VCtx->Top->GType, id.FullID(), MinREALHugeBlobInBytes);
717717
} catch (yexception ex) {
718718
LOG_ERROR_S(ctx, BS_VDISK_PUT, VCtx->VDiskLogPrefix << ex.what() << " Marker# BSVS41");
719-
info.HullStatus = {NKikimrProto::ERROR, 0, false};
719+
info.HullStatus = {NKikimrProto::ERROR, "", false};
720720
ReplyError({NKikimrProto::ERROR, ex.what(), 0, false}, ev, ctx, now);
721721
return;
722722
}
@@ -1850,7 +1850,7 @@ namespace NKikimr {
18501850
// check status
18511851
if (ev->Get()->Status == NKikimrProto::OK) {
18521852
ApplyHugeBlobSize(Config->MinHugeBlobInBytes);
1853-
Y_ABORT_UNLESS(MinREALHugeBlobInBytes);
1853+
Y_ABORT_UNLESS(MinREALHugeBlobInBytes);
18541854
// handle special case when donor disk starts and finds out that it has been wiped out
18551855
if (ev->Get()->LsnMngr->GetOriginallyRecoveredLsn() == 0 && Config->BaseInfo.DonorMode) {
18561856
// send drop donor cmd to NodeWarden
@@ -2426,7 +2426,7 @@ namespace NKikimr {
24262426
TActivationContext::Send(new IEventHandle(TEvBlobStorage::EvCommenceRepl, 0, Db->ReplID, SelfId(), nullptr, 0));
24272427
}
24282428
}
2429-
2429+
24302430
void PassAway() override {
24312431
Send(NConsole::MakeConfigsDispatcherID(SelfId().NodeId()), new NConsole::TEvConfigsDispatcher::TEvRemoveConfigSubscriptionRequest(
24322432
SelfId()

ydb/core/kqp/compile_service/kqp_compile_service.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ class TKqpCompileService : public TActorBootstrapped<TKqpCompileService> {
601601
const auto& query = ev->Get()->Query;
602602
LWTRACK(KqpCompileServiceHandleRequest,
603603
ev->Get()->Orbit,
604-
query ? query->UserSid : 0);
604+
query ? query->UserSid : "");
605605

606606
try {
607607
PerformRequest(ev, ctx);
@@ -703,7 +703,7 @@ class TKqpCompileService : public TActorBootstrapped<TKqpCompileService> {
703703

704704
LWTRACK(KqpCompileServiceEnqueued,
705705
ev->Get()->Orbit,
706-
ev->Get()->Query ? ev->Get()->Query->UserSid : 0);
706+
ev->Get()->Query ? ev->Get()->Query->UserSid : "");
707707

708708
TKqpCompileSettings compileSettings(
709709
request.KeepInCache,
@@ -1130,7 +1130,7 @@ class TKqpCompileService : public TActorBootstrapped<TKqpCompileService> {
11301130
const auto& query = compileResult->Query;
11311131
LWTRACK(KqpCompileServiceReply,
11321132
orbit,
1133-
query ? query->UserSid : 0,
1133+
query ? query->UserSid : "",
11341134
compileResult->Issues.ToString());
11351135

11361136
LOG_DEBUG_S(ctx, NKikimrServices::KQP_COMPILE_SERVICE, "Send response"

ydb/core/mind/bscontroller/load_everything.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ class TBlobStorageController::TTxLoadEverything : public TTransactionBase<TBlobS
193193
groups.GetValueOrDefault<T::DesiredVDiskCategory>(NKikimrBlobStorage::TVDiskKind::Default),
194194
groups.GetValueOrDefault<T::EncryptionMode>(),
195195
groups.GetValueOrDefault<T::LifeCyclePhase>(),
196-
groups.GetValueOrDefault<T::MainKeyId>(nullptr),
197-
groups.GetValueOrDefault<T::EncryptedGroupKey>(nullptr),
196+
groups.GetValueOrDefault<T::MainKeyId>(),
197+
groups.GetValueOrDefault<T::EncryptedGroupKey>(),
198198
groups.GetValueOrDefault<T::GroupKeyNonce>(),
199199
groups.GetValueOrDefault<T::MainKeyVersion>(),
200200
groups.GetValueOrDefault<T::Down>(),

ydb/core/persqueue/partition.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ TPartition::TPartition(ui64 tabletId, const TPartitionId& partition, const TActo
191191
, WriteInflightSize(0)
192192
, Tablet(tablet)
193193
, BlobCache(blobCache)
194-
, PartitionedBlob(partition, 0, 0, 0, 0, 0, Head, NewHead, true, false, 8_MB)
194+
, PartitionedBlob(partition, 0, "", 0, 0, 0, Head, NewHead, true, false, 8_MB)
195195
, NewHeadKey{TKey{}, 0, TInstant::Zero(), 0}
196196
, BodySize(0)
197197
, MaxWriteResponsesSize(0)

ydb/core/persqueue/partition_init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ void TPartition::Initialize(const TActorContext& ctx) {
737737
ui32 border = LEVEL0;
738738
MaxSizeCheck = 0;
739739
MaxBlobSize = AppData(ctx)->PQConfig.GetMaxBlobSize();
740-
PartitionedBlob = TPartitionedBlob(Partition, 0, 0, 0, 0, 0, Head, NewHead, true, false, MaxBlobSize);
740+
PartitionedBlob = TPartitionedBlob(Partition, 0, "", 0, 0, 0, Head, NewHead, true, false, MaxBlobSize);
741741
for (ui32 i = 0; i < TotalLevels; ++i) {
742742
CompactLevelBorder.push_back(border);
743743
MaxSizeCheck += border;

0 commit comments

Comments
 (0)