Skip to content

Commit 6afe3c8

Browse files
Revert "Get topic data handler (#15038)" (#15245)
1 parent ed4cd96 commit 6afe3c8

17 files changed

+76
-859
lines changed

ydb/core/http_proxy/ut/internal_counters.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@
611611
"folder_id": "folder4",
612612
"database": "/Root"
613613
},
614-
"value":243,
614+
"value":238,
615615
"kind":"RATE"
616616
},
617617
{

ydb/core/persqueue/partition.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,7 @@ void TPartition::Handle(TEvPQ::TEvBlobResponse::TPtr& ev, const TActorContext& c
14141414
}
14151415

14161416
TReadAnswer answer(info.FormAnswer(
1417-
ctx, *ev->Get(), StartOffset, EndOffset, Partition, userInfo,
1417+
ctx, *ev->Get(), EndOffset, Partition, userInfo,
14181418
info.Destination, GetSizeLag(info.Offset), Tablet, Config.GetMeteringMode(), IsActive()
14191419
));
14201420
const auto& resp = dynamic_cast<TEvPQ::TEvProxyResponse*>(answer.Event.Get())->Response;

ydb/core/persqueue/partition_read.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ ui64 GetFirstHeaderOffset(const TKey& key, const TString& blob)
372372
TReadAnswer TReadInfo::FormAnswer(
373373
const TActorContext& ctx,
374374
const TEvPQ::TEvBlobResponse& blobResponse,
375-
const ui64 startOffset,
376375
const ui64 endOffset,
377376
const TPartitionId& partition,
378377
TUserInfo* userInfo,
@@ -399,9 +398,7 @@ TReadAnswer TReadInfo::FormAnswer(
399398
res.SetErrorCode(NPersQueue::NErrorCode::OK);
400399
auto readResult = res.MutablePartitionResponse()->MutableCmdReadResult();
401400
readResult->SetWaitQuotaTimeMs(WaitQuotaTime.MilliSeconds());
402-
readResult->SetStartOffset(startOffset);
403401
readResult->SetMaxOffset(endOffset);
404-
readResult->SetEndOffset(endOffset);
405402
readResult->SetRealReadOffset(Offset);
406403
ui64 realReadOffset = Offset;
407404
readResult->SetReadFromTimestampMs(ReadTimestampMs);
@@ -465,7 +462,6 @@ TReadAnswer TReadInfo::FormAnswer(
465462
SizeEstimate = answerSize;
466463
readResult->SetSizeEstimate(SizeEstimate);
467464
readResult->SetLastOffset(LastOffset);
468-
readResult->SetStartOffset(startOffset);
469465
readResult->SetEndOffset(endOffset);
470466
return {answerSize, std::move(answer)};
471467
}
@@ -499,7 +495,7 @@ TReadAnswer TReadInfo::FormAnswer(
499495
continue;
500496

501497

502-
PQ_LOG_D("FormAnswer processing batch offset " << (offset - header.GetCount()) << " totakecount " << count << " count " << header.GetCount()
498+
PQ_LOG_D("FormAnswer processing batch offset " << (offset - header.GetCount()) << " totakecount " << count << " count " << header.GetCount()
503499
<< " size " << header.GetPayloadSize() << " from pos " << pos << " cbcount " << batch.Blobs.size());
504500

505501
for (size_t i = pos; i < batch.Blobs.size(); ++i) {
@@ -572,7 +568,6 @@ TReadAnswer TReadInfo::FormAnswer(
572568
SizeEstimate = answerSize;
573569
readResult->SetSizeEstimate(SizeEstimate);
574570
readResult->SetLastOffset(LastOffset);
575-
readResult->SetStartOffset(startOffset);
576571
readResult->SetEndOffset(endOffset);
577572

578573
return {answerSize, std::move(answer)};
@@ -583,7 +578,7 @@ void TPartition::Handle(TEvPQ::TEvReadTimeout::TPtr& ev, const TActorContext& ct
583578
if (!res)
584579
return;
585580
TReadAnswer answer(res->FormAnswer(
586-
ctx, StartOffset, res->Offset, Partition, nullptr, res->Destination, 0, Tablet, Config.GetMeteringMode(), IsActive()
581+
ctx, res->Offset, Partition, nullptr, res->Destination, 0, Tablet, Config.GetMeteringMode(), IsActive()
587582
));
588583
ctx.Send(Tablet, answer.Event.Release());
589584
PQ_LOG_D(" waiting read cookie " << ev->Get()->Cookie
@@ -1033,7 +1028,7 @@ void TPartition::ProcessRead(const TActorContext& ctx, TReadInfo&& info, const u
10331028
PQ_LOG_D("Reading cookie " << cookie << ". All data is from uncompacted head.");
10341029

10351030
TReadAnswer answer = info.FormAnswer(
1036-
ctx, StartOffset, EndOffset, Partition, &UsersInfoStorage->GetOrCreate(info.User, ctx),
1031+
ctx, EndOffset, Partition, &UsersInfoStorage->GetOrCreate(info.User, ctx),
10371032
info.Destination, GetSizeLag(info.Offset), Tablet, Config.GetMeteringMode(), IsActive()
10381033
);
10391034
const auto* ev = dynamic_cast<TEvPQ::TEvProxyResponse*>(answer.Event.Get());

ydb/core/persqueue/pq_impl.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,6 @@ class TReadProxy : public TActorBootstrapped<TReadProxy> {
183183
auto partResp = responseRecord.MutablePartitionResponse()->MutableCmdReadResult();
184184

185185
partResp->SetMaxOffset(readResult.GetMaxOffset());
186-
partResp->SetStartOffset(readResult.GetStartOffset());
187-
partResp->SetEndOffset(readResult.GetEndOffset());
188186
partResp->SetSizeLag(readResult.GetSizeLag());
189187
partResp->SetWaitQuotaTimeMs(partResp->GetWaitQuotaTimeMs() + readResult.GetWaitQuotaTimeMs());
190188

ydb/core/persqueue/subscriber.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ struct TReadInfo {
8181
TReadAnswer FormAnswer(
8282
const TActorContext& ctx,
8383
const TEvPQ::TEvBlobResponse& response,
84-
const ui64 startOffset,
8584
const ui64 endOffset,
8685
const TPartitionId& partition,
8786
TUserInfo* ui,
@@ -94,7 +93,6 @@ struct TReadInfo {
9493

9594
TReadAnswer FormAnswer(
9695
const TActorContext& ctx,
97-
const ui64 startOffset,
9896
const ui64 endOffset,
9997
const TPartitionId& partition,
10098
TUserInfo* ui,
@@ -105,7 +103,7 @@ struct TReadInfo {
105103
const bool isActive
106104
) {
107105
TEvPQ::TEvBlobResponse response(0, TVector<TRequestedBlob>());
108-
return FormAnswer(ctx, response, startOffset, endOffset, partition, ui, dst, sizeLag, tablet, meteringMode, isActive);
106+
return FormAnswer(ctx, response, endOffset, partition, ui, dst, sizeLag, tablet, meteringMode, isActive);
109107
}
110108
};
111109

ydb/core/protos/msgbus_pq.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@ message TCmdReadResult {
417417
optional uint64 ReadFromTimestampMs = 12;
418418
optional uint64 SizeEstimate = 13;
419419
optional int64 LastOffset = 14;
420-
optional uint64 StartOffset = 17;
421420
optional uint64 EndOffset = 15;
422421
optional bool ReadingFinished = 16;
423422
}

ydb/core/viewer/json_handlers_viewer.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "viewer_describe.h"
1313
#include "viewer_describe_topic.h"
1414
#include "viewer_feature_flags.h"
15-
#include "viewer_topic_data.h"
1615
#include "viewer_graph.h"
1716
#include "viewer_healthcheck.h"
1817
#include "viewer_hiveinfo.h"
@@ -190,10 +189,6 @@ void InitViewerTopicInfoJsonHandler(TJsonHandlers& handlers) {
190189
handlers.AddHandler("/viewer/topicinfo", new TJsonHandler<TJsonTopicInfo>(TJsonTopicInfo::GetSwagger()));
191190
}
192191

193-
void InitViewerTopicDataJsonHandler(TJsonHandlers& handlers) {
194-
handlers.AddHandler("/viewer/topic_data", new TJsonHandler<TTopicData>(TTopicData::GetSwagger()));
195-
}
196-
197192
void InitViewerPQConsumerInfoJsonHandler(TJsonHandlers& handlers) {
198193
handlers.AddHandler("/viewer/pqconsumerinfo", new TJsonHandler<TJsonPQConsumerInfo>(TJsonPQConsumerInfo::GetSwagger()));
199194
}
@@ -308,7 +303,6 @@ void InitViewerJsonHandlers(TJsonHandlers& jsonHandlers) {
308303
InitViewerConfigJsonHandler(jsonHandlers);
309304
InitViewerCountersJsonHandler(jsonHandlers);
310305
InitViewerTopicInfoJsonHandler(jsonHandlers);
311-
InitViewerTopicDataJsonHandler(jsonHandlers);
312306
InitViewerPQConsumerInfoJsonHandler(jsonHandlers);
313307
InitViewerTabletCountersJsonHandler(jsonHandlers);
314308
InitViewerStorageJsonHandler(jsonHandlers);

ydb/core/viewer/json_pipe_req.cpp

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -544,48 +544,24 @@ void TViewerPipeClient::RequestBSControllerPDiskUpdateStatus(const NKikimrBlobSt
544544
SendRequestToPipe(pipeClient, request.Release());
545545
}
546546

547-
THolder<NSchemeCache::TSchemeCacheNavigate> TViewerPipeClient::SchemeCacheNavigateRequestBuilder (
548-
std::function<void (NSchemeCache::TSchemeCacheNavigate::TEntry&)> fillRequestEntryFunc
549-
) {
547+
void TViewerPipeClient::RequestSchemeCacheNavigate(const TString& path) {
550548
THolder<NSchemeCache::TSchemeCacheNavigate> request = MakeHolder<NSchemeCache::TSchemeCacheNavigate>();
551549
NSchemeCache::TSchemeCacheNavigate::TEntry entry;
550+
entry.Path = SplitPath(path);
552551
entry.RedirectRequired = false;
553552
entry.Operation = NSchemeCache::TSchemeCacheNavigate::EOp::OpPath;
554-
fillRequestEntryFunc(entry);
555553
request->ResultSet.emplace_back(entry);
556-
return request;
557-
}
558-
559-
void TViewerPipeClient::RequestSchemeCacheNavigateWithParams(const TString& path, ui32 access, bool showPrivate) {
560-
auto request = SchemeCacheNavigateRequestBuilder(
561-
[&](auto& entry) {
562-
entry.Path = SplitPath(path);
563-
entry.Access = access;
564-
entry.ShowPrivatePath = showPrivate;
565-
}
566-
);
567-
if (!Event->Get()->UserToken.empty())
568-
request->UserToken = new NACLib::TUserToken(Event->Get()->UserToken);
569-
570-
SendRequest(MakeSchemeCacheID(), new TEvTxProxySchemeCache::TEvNavigateKeySet(request.Release()));
571-
}
572-
573-
void TViewerPipeClient::RequestSchemeCacheNavigate(const TString& path) {
574-
auto request = SchemeCacheNavigateRequestBuilder(
575-
[&](auto& entry) {
576-
entry.Path = SplitPath(path);
577-
}
578-
);
579554
SendRequest(MakeSchemeCacheID(), new TEvTxProxySchemeCache::TEvNavigateKeySet(request.Release()));
580555
}
581556

582557
void TViewerPipeClient::RequestSchemeCacheNavigate(const TPathId& pathId) {
583-
auto request = SchemeCacheNavigateRequestBuilder(
584-
[&](auto& entry) {
585-
entry.TableId.PathId = pathId;
586-
entry.RequestType = NSchemeCache::TSchemeCacheNavigate::TEntry::ERequestType::ByTableId;
587-
}
588-
);
558+
THolder<NSchemeCache::TSchemeCacheNavigate> request = MakeHolder<NSchemeCache::TSchemeCacheNavigate>();
559+
NSchemeCache::TSchemeCacheNavigate::TEntry entry;
560+
entry.TableId.PathId = pathId;
561+
entry.RequestType = NSchemeCache::TSchemeCacheNavigate::TEntry::ERequestType::ByTableId;
562+
entry.RedirectRequired = false;
563+
entry.Operation = NSchemeCache::TSchemeCacheNavigate::EOp::OpPath;
564+
request->ResultSet.emplace_back(entry);
589565
SendRequest(MakeSchemeCacheID(), new TEvTxProxySchemeCache::TEvNavigateKeySet(request.Release()));
590566
}
591567

@@ -800,10 +776,6 @@ TString TViewerPipeClient::GetHTTPBADREQUEST(TString contentType, TString respon
800776
return Viewer->GetHTTPBADREQUEST(GetRequest(), std::move(contentType), std::move(response));
801777
}
802778

803-
TString TViewerPipeClient::GetHTTPNOTFOUND(TString, TString) {
804-
return Viewer->GetHTTPNOTFOUND(GetRequest());
805-
}
806-
807779
TString TViewerPipeClient::GetHTTPINTERNALERROR(TString contentType, TString response) {
808780
return Viewer->GetHTTPINTERNALERROR(GetRequest(), std::move(contentType), std::move(response));
809781
}

ydb/core/viewer/json_pipe_req.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -266,14 +266,8 @@ class TViewerPipeClient : public TActorBootstrapped<TViewerPipeClient> {
266266
TRequestResponse<NSysView::TEvSysView::TEvGetPDisksResponse> RequestBSControllerPDisks();
267267
TRequestResponse<NSysView::TEvSysView::TEvGetStorageStatsResponse> RequestBSControllerStorageStats();
268268
void RequestBSControllerPDiskUpdateStatus(const NKikimrBlobStorage::TUpdateDriveStatus& driveStatus, bool force = false);
269-
270-
THolder<NSchemeCache::TSchemeCacheNavigate> SchemeCacheNavigateRequestBuilder(
271-
std::function<void (NSchemeCache::TSchemeCacheNavigate::TEntry&)> fillRequestEntryFunc);
272-
273269
void RequestSchemeCacheNavigate(const TString& path);
274270
void RequestSchemeCacheNavigate(const TPathId& pathId);
275-
void RequestSchemeCacheNavigateWithParams(const TString& path, ui32 access = NACLib::DescribeSchema, bool showPrivate = false);
276-
277271
TRequestResponse<TEvTxProxySchemeCache::TEvNavigateKeySetResult> MakeRequestSchemeCacheNavigate(const TString& path, ui64 cookie = 0);
278272
TRequestResponse<TEvTxProxySchemeCache::TEvNavigateKeySetResult> MakeRequestSchemeCacheNavigate(TPathId pathId, ui64 cookie = 0);
279273
TRequestResponse<TEvViewer::TEvViewerResponse> MakeRequestViewer(TNodeId nodeId, TEvViewer::TEvViewerRequest* request, ui32 flags = 0);
@@ -322,7 +316,6 @@ class TViewerPipeClient : public TActorBootstrapped<TViewerPipeClient> {
322316
TString GetHTTPOKJSON(const google::protobuf::Message& response, TInstant lastModified = {});
323317
TString GetHTTPGATEWAYTIMEOUT(TString contentType = {}, TString response = {});
324318
TString GetHTTPBADREQUEST(TString contentType = {}, TString response = {});
325-
TString GetHTTPNOTFOUND(TString contentType = {}, TString response = {});
326319
TString GetHTTPINTERNALERROR(TString contentType = {}, TString response = {});
327320
TString GetHTTPFORBIDDEN(TString contentType = {}, TString response = {});
328321
TString MakeForward(const std::vector<ui32>& nodes);

0 commit comments

Comments
 (0)