Skip to content

Commit 38ca647

Browse files
remove ipp files from server source code (#3248)
1 parent 59b0201 commit 38ca647

File tree

5 files changed

+25
-23
lines changed

5 files changed

+25
-23
lines changed

ydb/services/persqueue_v1/actors/read_session_actor.ipp renamed to ydb/services/persqueue_v1/actors/read_session_actor.cpp

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#ifndef READ_SESSION_ACTOR_IMPL
21
#include "read_session_actor.h"
3-
#error "Do not include this file directly"
4-
#endif
5-
62

73
#include "helpers.h"
84
#include "read_init_auth_actor.h"
@@ -13,8 +9,6 @@
139
#include <library/cpp/protobuf/util/repeated_field_utils.h>
1410
#include <library/cpp/random_provider/random_provider.h>
1511

16-
#include <google/protobuf/util/time_util.h>
17-
1812
#include <util/string/join.h>
1913
#include <util/string/strip.h>
2014

@@ -478,7 +472,7 @@ void TReadSessionActor<UseMigrationProtocol>::Handle(TEvPQProxy::TEvDirectReadAc
478472

479473
if (it->second.MaxProcessedDirectReadId + 1 != (ui64)ev->Get()->DirectReadId) {
480474
return CloseSession(PersQueue::ErrorCode::BAD_REQUEST, TStringBuilder()
481-
<< "direct reads must be confirmed in strict order - expecting " << (it->second.MaxProcessedDirectReadId + 1)
475+
<< "direct reads must be confirmed in strict order - expecting " << (it->second.MaxProcessedDirectReadId + 1)
482476
<< " but got " << ev->Get()->DirectReadId, ctx);
483477
}
484478

@@ -565,7 +559,7 @@ void TReadSessionActor<UseMigrationProtocol>::Handle(TEvPQProxy::TEvReleased::TP
565559
return CloseSession(PersQueue::ErrorCode::BAD_REQUEST, TStringBuilder()
566560
<< "release of partition that is not requested is forbiden for " << partitionInfo.Partition, ctx);
567561
}
568-
//TODO: filter all direct reads
562+
//TODO: filter all direct reads
569563
ReleasePartition(it, true, ctx);
570564
}
571565
}
@@ -1076,7 +1070,7 @@ void TReadSessionActor<UseMigrationProtocol>::InitSession(const TActorContext& c
10761070
if (!ReadWithoutConsumer) {
10771071
holder.PipeClient = CreatePipeClient(holder.TabletID, ctx);
10781072
}
1079-
1073+
10801074
Y_ABORT_UNLESS(holder.FullConverter);
10811075
auto it = TopicGroups.find(holder.FullConverter->GetInternalName());
10821076
if (it != TopicGroups.end()) {
@@ -1738,6 +1732,9 @@ i64 TFormedReadResponse<TServerMessage>::ApplyDirectReadResponse(TEvPQProxy::TEv
17381732
return diff;
17391733
}
17401734

1735+
//explicit instantation
1736+
template struct TFormedReadResponse<PersQueue::V1::MigrationStreamingReadServerMessage>;
1737+
template struct TFormedReadResponse<Topic::StreamReadMessage::FromServer>;
17411738

17421739
template <bool UseMigrationProtocol>
17431740
void TReadSessionActor<UseMigrationProtocol>::Handle(typename TEvReadResponse::TPtr& ev, const TActorContext& ctx) {
@@ -2252,4 +2249,8 @@ void TReadSessionActor<UseMigrationProtocol>::RunAuthActor(const TActorContext&
22522249
TopicsHandler.GetLocalCluster(), ReadWithoutConsumer));
22532250
}
22542251

2252+
//explicit instantation
2253+
template class TReadSessionActor<true>;
2254+
template class TReadSessionActor<false>;
2255+
22552256
}

ydb/services/persqueue_v1/actors/read_session_actor.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,20 @@
66

77
#include <ydb/core/base/tablet_pipe.h>
88
#include <ydb/core/grpc_services/grpc_request_proxy.h>
9+
#include <ydb/core/persqueue/dread_cache_service/caching_service.h>
910
#include <ydb/core/persqueue/events/global.h>
11+
#include <ydb/core/persqueue/events/internal.h>
1012
#include <ydb/core/persqueue/pq_rl_helpers.h>
1113

1214
#include <ydb/library/actors/core/actor_bootstrapped.h>
15+
1316
#include <library/cpp/containers/disjoint_interval_tree/disjoint_interval_tree.h>
1417

1518
#include <util/generic/guid.h>
1619
#include <util/system/compiler.h>
1720

21+
#include <google/protobuf/util/time_util.h>
22+
1823
#include <type_traits>
1924

2025
namespace NKikimr::NGRpcProxy::V1 {
@@ -444,8 +449,3 @@ class TReadSessionActor
444449
};
445450

446451
}
447-
448-
// Implementation
449-
#define READ_SESSION_ACTOR_IMPL
450-
#include "read_session_actor.ipp"
451-
#undef READ_SESSION_ACTOR_IMPL

ydb/services/persqueue_v1/actors/write_session_actor.ipp renamed to ydb/services/persqueue_v1/actors/write_session_actor.cpp

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
#ifndef WRITE_SESSION_ACTOR_IMPL
21
#include "write_session_actor.h"
3-
#error "Do not include this file directly"
4-
#endif
52

63
#include "codecs.h"
74
#include "helpers.h"
@@ -71,6 +68,10 @@ ECodec<UseMigrationProtocol> CodecByName(const TString& codec) {
7168
return codecIt->second;
7269
}
7370

71+
//explicit instantation
72+
template Ydb::PersQueue::V1::Codec CodecByName<true>(const TString& codec);
73+
template i32 CodecByName<false>(const TString& codec);
74+
7475
template <>
7576
inline void FillExtraFieldsForDataChunk(
7677
const Ydb::PersQueue::V1::StreamingWriteClientMessage::InitRequest& init,
@@ -1531,5 +1532,9 @@ void TWriteSessionActor<UseMigrationProtocol>::RecheckACL(const TActorContext& c
15311532
}
15321533
}
15331534

1535+
//explicit instantation
1536+
template class TWriteSessionActor<true>;
1537+
template class TWriteSessionActor<false>;
1538+
15341539
}
15351540
}

ydb/services/persqueue_v1/actors/write_session_actor.h

-6
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,3 @@ class TWriteSessionActor
276276
};
277277

278278
}
279-
280-
/////////////////////////////////////////
281-
// Implementation
282-
#define WRITE_SESSION_ACTOR_IMPL
283-
#include "write_session_actor.ipp"
284-
#undef WRITE_SESSION_ACTOR_IMPL

ydb/services/persqueue_v1/actors/ya.make

+2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ SRCS(
3939
read_info_actor.h
4040
read_info_actor.cpp
4141
read_session_actor.h
42+
read_session_actor.cpp
4243
direct_read_actor.h
4344
direct_read_actor.cpp
4445
write_session_actor.h
46+
write_session_actor.cpp
4547
schema_actors.h
4648
schema_actors.cpp
4749
update_offsets_in_transaction_actor.cpp

0 commit comments

Comments
 (0)