Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ydb/core/persqueue/fetch_request_actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include <ydb/library/actors/core/actor.h>
#include <ydb/library/aclib/aclib.h>

#include "user_info.h"

namespace NKikimr::NPQ {

struct TPartitionFetchRequest {
Expand All @@ -14,7 +16,7 @@ struct TPartitionFetchRequest {
ui64 MaxBytes;
ui64 ReadTimestampMs;

TPartitionFetchRequest(const TString& topic, const TString& clientId, ui32 partition, ui64 offset, ui64 maxBytes, ui64 readTimestampMs = 0)
TPartitionFetchRequest(const TString& topic, ui32 partition, ui64 offset, ui64 maxBytes, ui64 readTimestampMs = 0, const TString& clientId = NKikimr::NPQ::CLIENTID_WITHOUT_CONSUMER)
: Topic(topic)
, ClientId(clientId)
, Partition(partition)
Expand Down
6 changes: 3 additions & 3 deletions ydb/core/persqueue/ut/fetch_request_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Y_UNIT_TEST_SUITE(TFetchRequestTests) {
TPartitionFetchRequest p2{"Root/PQ/rt3.dc1--topic2", 3, 0, 10000};
TPartitionFetchRequest pbad{"Root/PQ/rt3.dc1--topic2", 2, 1, 10000};

TFetchRequestSettings settings{{}, {p1, p2, pbad}, 10000, 10000};
TFetchRequestSettings settings{{}, {p1, p2, pbad}, 10000, 10000, {}};
auto fetchId = runtime.Register(CreatePQFetchRequestActor(settings, MakeSchemeCacheID(), edgeId));
runtime.EnableScheduleForActor(fetchId);
runtime.DispatchEvents();
Expand Down Expand Up @@ -98,7 +98,7 @@ Y_UNIT_TEST_SUITE(TFetchRequestTests) {
TPartitionFetchRequest p1{"Root/PQ/rt3.dc1--topic1", 1, 1, 10000};
TPartitionFetchRequest p2{"Root/PQ/rt3.dc1--topic2", 3, 0, 10000};

TFetchRequestSettings settings{{}, {p1, p2}, 10000, 10000};
TFetchRequestSettings settings{{}, {p1, p2}, 10000, 10000, {}};
auto fetchId = runtime.Register(CreatePQFetchRequestActor(settings, MakeSchemeCacheID(), edgeId));
runtime.EnableScheduleForActor(fetchId);

Expand All @@ -121,7 +121,7 @@ Y_UNIT_TEST_SUITE(TFetchRequestTests) {
TPartitionFetchRequest p1{"Root/PQ/rt3.dc1--topic1", 1, 1, 10000};
NACLib::TUserToken goodToken("user1@staff", {});
NACLib::TUserToken badToken("bad-user@staff", {});
TFetchRequestSettings settings{{}, {p1}, 10000, 10000, goodToken};
TFetchRequestSettings settings{{}, {p1}, 10000, 10000, {}, goodToken};
auto fetchId = runtime.Register(CreatePQFetchRequestActor(settings, MakeSchemeCacheID(), edgeId));
runtime.EnableScheduleForActor(fetchId);

Expand Down