Skip to content

remove ipp files from server source code #3248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2024
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
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#ifndef READ_SESSION_ACTOR_IMPL
#include "read_session_actor.h"
#error "Do not include this file directly"
#endif


#include "helpers.h"
#include "read_init_auth_actor.h"
Expand All @@ -13,8 +9,6 @@
#include <library/cpp/protobuf/util/repeated_field_utils.h>
#include <library/cpp/random_provider/random_provider.h>

#include <google/protobuf/util/time_util.h>

#include <util/string/join.h>
#include <util/string/strip.h>

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

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

Expand Down Expand Up @@ -565,7 +559,7 @@ void TReadSessionActor<UseMigrationProtocol>::Handle(TEvPQProxy::TEvReleased::TP
return CloseSession(PersQueue::ErrorCode::BAD_REQUEST, TStringBuilder()
<< "release of partition that is not requested is forbiden for " << partitionInfo.Partition, ctx);
}
//TODO: filter all direct reads
//TODO: filter all direct reads
ReleasePartition(it, true, ctx);
}
}
Expand Down Expand Up @@ -1076,7 +1070,7 @@ void TReadSessionActor<UseMigrationProtocol>::InitSession(const TActorContext& c
if (!ReadWithoutConsumer) {
holder.PipeClient = CreatePipeClient(holder.TabletID, ctx);
}

Y_ABORT_UNLESS(holder.FullConverter);
auto it = TopicGroups.find(holder.FullConverter->GetInternalName());
if (it != TopicGroups.end()) {
Expand Down Expand Up @@ -1738,6 +1732,9 @@ i64 TFormedReadResponse<TServerMessage>::ApplyDirectReadResponse(TEvPQProxy::TEv
return diff;
}

//explicit instantation
template struct TFormedReadResponse<PersQueue::V1::MigrationStreamingReadServerMessage>;
template struct TFormedReadResponse<Topic::StreamReadMessage::FromServer>;

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

//explicit instantation
template class TReadSessionActor<true>;
template class TReadSessionActor<false>;

}
10 changes: 5 additions & 5 deletions ydb/services/persqueue_v1/actors/read_session_actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@

#include <ydb/core/base/tablet_pipe.h>
#include <ydb/core/grpc_services/grpc_request_proxy.h>
#include <ydb/core/persqueue/dread_cache_service/caching_service.h>
#include <ydb/core/persqueue/events/global.h>
#include <ydb/core/persqueue/events/internal.h>
#include <ydb/core/persqueue/pq_rl_helpers.h>

#include <ydb/library/actors/core/actor_bootstrapped.h>

#include <library/cpp/containers/disjoint_interval_tree/disjoint_interval_tree.h>

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

#include <google/protobuf/util/time_util.h>

#include <type_traits>

namespace NKikimr::NGRpcProxy::V1 {
Expand Down Expand Up @@ -444,8 +449,3 @@ class TReadSessionActor
};

}

// Implementation
#define READ_SESSION_ACTOR_IMPL
#include "read_session_actor.ipp"
#undef READ_SESSION_ACTOR_IMPL
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#ifndef WRITE_SESSION_ACTOR_IMPL
#include "write_session_actor.h"
#error "Do not include this file directly"
#endif

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

//explicit instantation
template Ydb::PersQueue::V1::Codec CodecByName<true>(const TString& codec);
template i32 CodecByName<false>(const TString& codec);

template <>
inline void FillExtraFieldsForDataChunk(
const Ydb::PersQueue::V1::StreamingWriteClientMessage::InitRequest& init,
Expand Down Expand Up @@ -1531,5 +1532,9 @@ void TWriteSessionActor<UseMigrationProtocol>::RecheckACL(const TActorContext& c
}
}

//explicit instantation
template class TWriteSessionActor<true>;
template class TWriteSessionActor<false>;

}
}
6 changes: 0 additions & 6 deletions ydb/services/persqueue_v1/actors/write_session_actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,3 @@ class TWriteSessionActor
};

}

/////////////////////////////////////////
// Implementation
#define WRITE_SESSION_ACTOR_IMPL
#include "write_session_actor.ipp"
#undef WRITE_SESSION_ACTOR_IMPL
2 changes: 2 additions & 0 deletions ydb/services/persqueue_v1/actors/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ SRCS(
read_info_actor.h
read_info_actor.cpp
read_session_actor.h
read_session_actor.cpp
direct_read_actor.h
direct_read_actor.cpp
write_session_actor.h
write_session_actor.cpp
schema_actors.h
schema_actors.cpp
update_offsets_in_transaction_actor.cpp
Expand Down