aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgvit <gvit@ydb.tech>2023-01-23 13:35:08 +0300
committergvit <gvit@ydb.tech>2023-01-23 13:35:08 +0300
commitda72c4727923040ee9f7328caa9ee22e4bd4ab09 (patch)
tree724aaad14329bb2ae9821238b1d43b34e1af1a9d
parent006419e12383729f3d660ad51f5a84832d6e3780 (diff)
downloadydb-da72c4727923040ee9f7328caa9ee22e4bd4ab09.tar.gz
Revert "Support interface part for ExternalDataChannel feature"
This reverts commit 0a05f95e826bc5416a494ba7822d7d7eaa8ce52c, reversing changes made to 1c58d6c48d9dc449c72880696f23217d19595db1.
-rw-r--r--library/cpp/actors/core/event.cpp7
-rw-r--r--library/cpp/actors/core/event.h4
-rw-r--r--library/cpp/actors/core/event_load.h40
-rw-r--r--library/cpp/actors/core/event_pb.h34
-rw-r--r--library/cpp/actors/core/event_pb_payload_ut.cpp8
-rw-r--r--library/cpp/actors/core/mon_ut.cpp2
-rw-r--r--library/cpp/actors/interconnect/interconnect_channel.cpp8
-rw-r--r--library/cpp/actors/interconnect/interconnect_channel.h2
-rw-r--r--library/cpp/actors/interconnect/interconnect_tcp_input_session.cpp5
-rw-r--r--library/cpp/actors/interconnect/ut/channel_scheduler_ut.cpp2
-rw-r--r--library/cpp/actors/interconnect/ut/event_holder_pool_ut.cpp8
-rw-r--r--library/cpp/actors/interconnect/ut/interconnect_ut.cpp4
-rw-r--r--ydb/core/actorlib_impl/test_interconnect_ut.cpp2
-rw-r--r--ydb/core/base/tablet_pipe.h4
-rw-r--r--ydb/core/blobstorage/ut_vdisk/lib/test_synclog.cpp2
-rw-r--r--ydb/core/kqp/common/kqp.h6
-rw-r--r--ydb/core/tablet/tablet_pipe_client.cpp4
-rw-r--r--ydb/core/tablet/tablet_pipe_server.cpp7
-rw-r--r--ydb/core/test_tablet/state_server_interface.cpp5
-rw-r--r--ydb/core/testlib/fake_coordinator.h2
-rw-r--r--ydb/core/tx/mediator/tablet_queue.cpp2
-rw-r--r--ydb/core/tx/scheme_board/helpers.cpp2
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_side_effects.cpp2
-rw-r--r--ydb/core/tx/schemeshard/ut_helpers/test_env.cpp2
24 files changed, 62 insertions, 102 deletions
diff --git a/library/cpp/actors/core/event.cpp b/library/cpp/actors/core/event.cpp
index 6a5230f825..33f8ce2aaf 100644
--- a/library/cpp/actors/core/event.cpp
+++ b/library/cpp/actors/core/event.cpp
@@ -17,7 +17,7 @@ namespace NActors {
if (Event) {
TAllocChunkSerializer serializer;
Event->SerializeToArcadiaStream(&serializer);
- auto chainBuf = serializer.Release(Event->CreateSerializationInfo());
+ auto chainBuf = serializer.Release(Event->IsExtendedFormat());
Event.Reset();
return chainBuf;
}
@@ -25,13 +25,12 @@ namespace NActors {
}
TIntrusivePtr<TEventSerializedData> IEventHandle::GetChainBuffer() {
- if (Buffer) {
+ if (Buffer)
return Buffer;
- }
if (Event) {
TAllocChunkSerializer serializer;
Event->SerializeToArcadiaStream(&serializer);
- Buffer = serializer.Release(Event->CreateSerializationInfo());
+ Buffer = serializer.Release(Event->IsExtendedFormat());
return Buffer;
}
return new TEventSerializedData;
diff --git a/library/cpp/actors/core/event.h b/library/cpp/actors/core/event.h
index 4eedeb0574..6b92edaf41 100644
--- a/library/cpp/actors/core/event.h
+++ b/library/cpp/actors/core/event.h
@@ -47,10 +47,12 @@ namespace NActors {
virtual ui32 Type() const = 0;
virtual bool SerializeToArcadiaStream(TChunkSerializer*) const = 0;
virtual bool IsSerializable() const = 0;
+ virtual bool IsExtendedFormat() const {
+ return false;
+ }
virtual ui32 CalculateSerializedSizeCached() const {
return CalculateSerializedSize();
}
- virtual TEventSerializationInfo CreateSerializationInfo() const { return {}; }
};
// fat handle
diff --git a/library/cpp/actors/core/event_load.h b/library/cpp/actors/core/event_load.h
index 8d069c555d..c7cfbdd1b3 100644
--- a/library/cpp/actors/core/event_load.h
+++ b/library/cpp/actors/core/event_load.h
@@ -19,59 +19,39 @@ namespace NActors {
size_t Size;
};
- struct TEventSectionInfo {
- size_t Headroom = 0; // headroom to be created on the receiving side
- size_t Size = 0; // full size of serialized event section (a chunk in rope)
- size_t Tailroom = 0; // tailroom for the chunk
- size_t Alignment = 0; // required alignment
- };
-
- struct TEventSerializationInfo {
- bool IsExtendedFormat = {};
- std::vector<TEventSectionInfo> Sections;
- // total sum of Size for every section must match actual serialized size of the event
- };
-
class TEventSerializedData
: public TThrRefBase
{
TRope Rope;
- TEventSerializationInfo SerializationInfo;
+ bool ExtendedFormat = false;
public:
TEventSerializedData() = default;
- TEventSerializedData(TRope&& rope, TEventSerializationInfo&& serializationInfo)
+ TEventSerializedData(TRope&& rope, bool extendedFormat)
: Rope(std::move(rope))
- , SerializationInfo(std::move(serializationInfo))
+ , ExtendedFormat(extendedFormat)
{}
TEventSerializedData(const TEventSerializedData& original, TString extraBuffer)
: Rope(original.Rope)
- , SerializationInfo(original.SerializationInfo)
+ , ExtendedFormat(original.ExtendedFormat)
{
- if (!SerializationInfo.Sections.empty()) {
- SerializationInfo.Sections.push_back(TEventSectionInfo{0, extraBuffer.size(), 0, 0});
- }
Append(std::move(extraBuffer));
}
- TEventSerializedData(TString buffer, TEventSerializationInfo&& serializationInfo)
- : SerializationInfo(std::move(serializationInfo))
+ TEventSerializedData(TString buffer, bool extendedFormat)
+ : ExtendedFormat(extendedFormat)
{
Append(std::move(buffer));
}
- void SetSerializationInfo(TEventSerializationInfo&& serializationInfo) {
- SerializationInfo = std::move(serializationInfo);
- }
-
- const TEventSerializationInfo& GetSerializationInfo() const {
- return SerializationInfo;
+ void SetExtendedFormat() {
+ ExtendedFormat = true;
}
- TEventSerializationInfo ReleaseSerializationInfo() {
- return std::move(SerializationInfo);
+ bool IsExtendedFormat() const {
+ return ExtendedFormat;
}
TRope::TConstIterator GetBeginIter() const {
diff --git a/library/cpp/actors/core/event_pb.h b/library/cpp/actors/core/event_pb.h
index 594559cea7..2d388fceeb 100644
--- a/library/cpp/actors/core/event_pb.h
+++ b/library/cpp/actors/core/event_pb.h
@@ -56,8 +56,10 @@ namespace NActors {
bool WriteRope(const TRope *rope) override;
bool WriteString(const TString *s) override;
- inline TIntrusivePtr<TEventSerializedData> Release(TEventSerializationInfo&& serializationInfo) {
- Buffers->SetSerializationInfo(std::move(serializationInfo));
+ inline TIntrusivePtr<TEventSerializedData> Release(bool extendedFormat) {
+ if (extendedFormat) {
+ Buffers->SetExtendedFormat();
+ }
return std::move(Buffers);
}
@@ -158,6 +160,10 @@ namespace NActors {
return true;
}
+ bool IsExtendedFormat() const override {
+ return static_cast<bool>(Payload);
+ }
+
bool SerializeToArcadiaStream(TChunkSerializer* chunker) const override {
// serialize payload first
if (Payload) {
@@ -230,7 +236,7 @@ namespace NActors {
TRope::TConstIterator iter = input->GetBeginIter();
ui64 size = input->GetSize();
- if (const auto& info = input->GetSerializationInfo(); info.IsExtendedFormat) {
+ if (input->IsExtendedFormat()) {
// check marker
if (!iter.Valid() || *iter.ContiguousData() != PayloadMarker) {
Y_FAIL("invalid event");
@@ -282,28 +288,6 @@ namespace NActors {
CachedByteSize = 0;
}
- TEventSerializationInfo CreateSerializationInfo() const override {
- TEventSerializationInfo info;
-
- if (Payload) {
- char temp[MaxNumberBytes];
- info.Sections.push_back(TEventSectionInfo{0, 1, 0, 0}); // payload marker
- info.Sections.push_back(TEventSectionInfo{0, SerializeNumber(Payload.size(), temp), 0, 0});
- for (const TRope& payload : Payload) {
- info.Sections.push_back(TEventSectionInfo{0, SerializeNumber(payload.GetSize(), temp), 0, 0}); // length
- info.Sections.push_back(TEventSectionInfo{0, payload.GetSize(), 0, 0}); // data
- }
- info.IsExtendedFormat = true;
- } else {
- info.IsExtendedFormat = false;
- }
-
- const int byteSize = Max(0, Record.ByteSize());
- info.Sections.push_back(TEventSectionInfo{0, static_cast<size_t>(byteSize), 0, 0});
-
- return info;
- }
-
public:
void ReservePayload(size_t size) {
Payload.reserve(size);
diff --git a/library/cpp/actors/core/event_pb_payload_ut.cpp b/library/cpp/actors/core/event_pb_payload_ut.cpp
index fe47bf4de0..eab007bc15 100644
--- a/library/cpp/actors/core/event_pb_payload_ut.cpp
+++ b/library/cpp/actors/core/event_pb_payload_ut.cpp
@@ -50,7 +50,7 @@ Y_UNIT_TEST_SUITE(TEventProtoWithPayload) {
auto serializer = MakeHolder<TAllocChunkSerializer>();
msg.SerializeToArcadiaStream(serializer.Get());
- auto buffers = serializer->Release(msg.CreateSerializationInfo());
+ auto buffers = serializer->Release(msg.IsExtendedFormat());
UNIT_ASSERT_VALUES_EQUAL(buffers->GetSize(), msg.CalculateSerializedSize());
TString ser = buffers->GetString();
@@ -128,20 +128,20 @@ Y_UNIT_TEST_SUITE(TEventProtoWithPayload) {
auto serializer1 = MakeHolder<TAllocChunkSerializer>();
e1.SerializeToArcadiaStream(serializer1.Get());
- auto buffers1 = serializer1->Release(e1.CreateSerializationInfo());
+ auto buffers1 = serializer1->Release(e1.IsExtendedFormat());
UNIT_ASSERT_VALUES_EQUAL(buffers1->GetSize(), e1.CalculateSerializedSize());
TString ser1 = buffers1->GetString();
TEvMessageWithPayload e2(msg);
auto serializer2 = MakeHolder<TAllocChunkSerializer>();
e2.SerializeToArcadiaStream(serializer2.Get());
- auto buffers2 = serializer2->Release(e2.CreateSerializationInfo());
+ auto buffers2 = serializer2->Release(e2.IsExtendedFormat());
UNIT_ASSERT_VALUES_EQUAL(buffers2->GetSize(), e2.CalculateSerializedSize());
TString ser2 = buffers2->GetString();
UNIT_ASSERT_VALUES_EQUAL(ser1, ser2);
// deserialize
- auto data = MakeIntrusive<TEventSerializedData>(ser1, TEventSerializationInfo{});
+ auto data = MakeIntrusive<TEventSerializedData>(ser1, false);
THolder<TEvMessageWithPayloadPreSerialized> parsedEvent(static_cast<TEvMessageWithPayloadPreSerialized*>(TEvMessageWithPayloadPreSerialized::Load(data)));
UNIT_ASSERT_VALUES_EQUAL(parsedEvent->PreSerializedData, ""); // this field is empty after deserialization
auto& record = parsedEvent->GetRecord();
diff --git a/library/cpp/actors/core/mon_ut.cpp b/library/cpp/actors/core/mon_ut.cpp
index a2991e8a10..d70b2c4a89 100644
--- a/library/cpp/actors/core/mon_ut.cpp
+++ b/library/cpp/actors/core/mon_ut.cpp
@@ -17,7 +17,7 @@ Y_UNIT_TEST_SUITE(ActorSystemMon) {
TAllocChunkSerializer ser;
const bool success = ev->SerializeToArcadiaStream(&ser);
Y_VERIFY(success);
- auto buffer = ser.Release(ev->CreateSerializationInfo());
+ auto buffer = ser.Release(false);
std::unique_ptr<TEvRemoteHttpInfo> restored(dynamic_cast<TEvRemoteHttpInfo*>(TEvRemoteHttpInfo::Load(buffer.Get())));
UNIT_ASSERT(restored->Query == ev->Query);
UNIT_ASSERT(restored->Query.size());
diff --git a/library/cpp/actors/interconnect/interconnect_channel.cpp b/library/cpp/actors/interconnect/interconnect_channel.cpp
index 7f3bc65497..fed1394686 100644
--- a/library/cpp/actors/interconnect/interconnect_channel.cpp
+++ b/library/cpp/actors/interconnect/interconnect_channel.cpp
@@ -25,7 +25,7 @@ namespace NActors {
task.Orbit.Take(event.Orbit);
event.Descr.Flags = (event.Descr.Flags & ~IEventHandle::FlagForwardOnNondelivery) |
- (SerializationInfo.IsExtendedFormat ? IEventHandle::FlagExtendedFormat : 0);
+ (ExtendedFormat ? IEventHandle::FlagExtendedFormat : 0);
TChannelPart *part = static_cast<TChannelPart*>(task.GetFreeArea());
part->Channel = ChannelId | TChannelPart::LastPartFlag;
@@ -85,14 +85,14 @@ namespace NActors {
State = EState::CHUNKER;
IEventBase *base = event.Event.Get();
Chunker.SetSerializingEvent(base);
- SerializationInfo = base->CreateSerializationInfo();
+ ExtendedFormat = base->IsExtendedFormat();
} else if (event.Buffer) {
State = EState::BUFFER;
Iter = event.Buffer->GetBeginIter();
- SerializationInfo = event.Buffer->ReleaseSerializationInfo();
+ ExtendedFormat = event.Buffer->IsExtendedFormat();
} else {
State = EState::DESCRIPTOR;
- SerializationInfo = {};
+ ExtendedFormat = false;
}
break;
diff --git a/library/cpp/actors/interconnect/interconnect_channel.h b/library/cpp/actors/interconnect/interconnect_channel.h
index 4a476abc37..58783d3c8d 100644
--- a/library/cpp/actors/interconnect/interconnect_channel.h
+++ b/library/cpp/actors/interconnect/interconnect_channel.h
@@ -114,7 +114,7 @@ namespace NActors {
std::list<TEventHolder> NotYetConfirmed;
TRope::TConstIterator Iter;
TCoroutineChunkSerializer Chunker;
- TEventSerializationInfo SerializationInfo;
+ bool ExtendedFormat = false;
bool FeedDescriptor(TTcpPacketOutTask& task, TEventHolder& event, ui64 *weightConsumed);
diff --git a/library/cpp/actors/interconnect/interconnect_tcp_input_session.cpp b/library/cpp/actors/interconnect/interconnect_tcp_input_session.cpp
index b1212b8914..fdf035499f 100644
--- a/library/cpp/actors/interconnect/interconnect_tcp_input_session.cpp
+++ b/library/cpp/actors/interconnect/interconnect_tcp_input_session.cpp
@@ -327,15 +327,12 @@ namespace NActors {
return ReestablishConnection(TDisconnectReason::ChecksumError());
}
}
- TEventSerializationInfo serializationInfo{
- .IsExtendedFormat = bool(descr.Flags & IEventHandle::FlagExtendedFormat),
- };
auto ev = std::make_unique<IEventHandle>(SessionId,
descr.Type,
descr.Flags & ~IEventHandle::FlagExtendedFormat,
descr.Recipient,
descr.Sender,
- MakeIntrusive<TEventSerializedData>(std::move(data), std::move(serializationInfo)),
+ MakeIntrusive<TEventSerializedData>(std::move(data), bool(descr.Flags & IEventHandle::FlagExtendedFormat)),
descr.Cookie,
Params.PeerScopeId,
std::move(descr.TraceId));
diff --git a/library/cpp/actors/interconnect/ut/channel_scheduler_ut.cpp b/library/cpp/actors/interconnect/ut/channel_scheduler_ut.cpp
index 32c8237b59..565a511859 100644
--- a/library/cpp/actors/interconnect/ut/channel_scheduler_ut.cpp
+++ b/library/cpp/actors/interconnect/ut/channel_scheduler_ut.cpp
@@ -20,7 +20,7 @@ Y_UNIT_TEST_SUITE(ChannelScheduler) {
auto pushEvent = [&](size_t size, int channel) {
TString payload(size, 'X');
- auto ev = MakeHolder<IEventHandle>(1, 0, TActorId(), TActorId(), MakeIntrusive<TEventSerializedData>(payload, TEventSerializationInfo{}), 0);
+ auto ev = MakeHolder<IEventHandle>(1, 0, TActorId(), TActorId(), MakeIntrusive<TEventSerializedData>(payload, false), 0);
auto& ch = scheduler.GetOutputChannel(channel);
const bool wasWorking = ch.IsWorking();
ch.Push(*ev);
diff --git a/library/cpp/actors/interconnect/ut/event_holder_pool_ut.cpp b/library/cpp/actors/interconnect/ut/event_holder_pool_ut.cpp
index 7b45793e26..e6b2bd4e4c 100644
--- a/library/cpp/actors/interconnect/ut/event_holder_pool_ut.cpp
+++ b/library/cpp/actors/interconnect/ut/event_holder_pool_ut.cpp
@@ -29,16 +29,16 @@ Y_UNIT_TEST_SUITE(EventHolderPool) {
std::list<TEventHolder> q;
auto& ev1 = pool.Allocate(q);
- ev1.Buffer = MakeIntrusive<TEventSerializedData>(TString::Uninitialized(512 * 1024), TEventSerializationInfo{});
+ ev1.Buffer = MakeIntrusive<TEventSerializedData>(TString::Uninitialized(512 * 1024), true);
auto& ev2 = pool.Allocate(q);
- ev2.Buffer = MakeIntrusive<TEventSerializedData>(TString::Uninitialized(512 * 1024), TEventSerializationInfo{});
+ ev2.Buffer = MakeIntrusive<TEventSerializedData>(TString::Uninitialized(512 * 1024), true);
auto& ev3 = pool.Allocate(q);
- ev3.Buffer = MakeIntrusive<TEventSerializedData>(TString::Uninitialized(512 * 1024), TEventSerializationInfo{});
+ ev3.Buffer = MakeIntrusive<TEventSerializedData>(TString::Uninitialized(512 * 1024), true);
auto& ev4 = pool.Allocate(q);
- ev4.Buffer = MakeIntrusive<TEventSerializedData>(TString::Uninitialized(512 * 1024), TEventSerializationInfo{});
+ ev4.Buffer = MakeIntrusive<TEventSerializedData>(TString::Uninitialized(512 * 1024), true);
pool.Release(q, q.begin());
pool.Release(q, q.begin());
diff --git a/library/cpp/actors/interconnect/ut/interconnect_ut.cpp b/library/cpp/actors/interconnect/ut/interconnect_ut.cpp
index 3596bffd5a..8ef0b1507c 100644
--- a/library/cpp/actors/interconnect/ut/interconnect_ut.cpp
+++ b/library/cpp/actors/interconnect/ut/interconnect_ut.cpp
@@ -47,7 +47,7 @@ public:
const TSessionToCookie::iterator s2cIt = SessionToCookie.emplace(SessionId, NextCookie);
InFlight.emplace(NextCookie, std::make_tuple(s2cIt, MD5::CalcRaw(data)));
TActivationContext::Send(new IEventHandle(TEvents::THelloWorld::Ping, IEventHandle::FlagTrackDelivery, Recipient,
- SelfId(), MakeIntrusive<TEventSerializedData>(std::move(data), TEventSerializationInfo{}), NextCookie));
+ SelfId(), MakeIntrusive<TEventSerializedData>(std::move(data), false), NextCookie));
// Cerr << (TStringBuilder() << "Send# " << NextCookie << Endl);
++NextCookie;
}
@@ -126,7 +126,7 @@ public:
const TString& data = ev->GetChainBuffer()->GetString();
const TString& response = MD5::CalcRaw(data);
TActivationContext::Send(new IEventHandle(TEvents::THelloWorld::Pong, 0, ev->Sender, SelfId(),
- MakeIntrusive<TEventSerializedData>(response, TEventSerializationInfo{}), ev->Cookie));
+ MakeIntrusive<TEventSerializedData>(response, false), ev->Cookie));
}
STRICT_STFUNC(StateFunc,
diff --git a/ydb/core/actorlib_impl/test_interconnect_ut.cpp b/ydb/core/actorlib_impl/test_interconnect_ut.cpp
index e906aaba34..75bc226027 100644
--- a/ydb/core/actorlib_impl/test_interconnect_ut.cpp
+++ b/ydb/core/actorlib_impl/test_interconnect_ut.cpp
@@ -109,7 +109,7 @@ Y_UNIT_TEST_SUITE(TInterconnectTest) {
TAutoPtr<IEventHandle> GetSerialized(const TAutoPtr<IEventHandle>& ev) {
NActors::TAllocChunkSerializer chunker;
ev->GetBase()->SerializeToArcadiaStream(&chunker);
- auto Data = chunker.Release(ev->GetBase()->CreateSerializationInfo());
+ auto Data = chunker.Release(ev->GetBase()->IsExtendedFormat());
TAutoPtr<IEventHandle> serev =
new IEventHandle(ev->GetBase()->Type(), ev->Flags,
ev->Recipient, ev->Sender,
diff --git a/ydb/core/base/tablet_pipe.h b/ydb/core/base/tablet_pipe.h
index 3f74bf1004..76c0b30e69 100644
--- a/ydb/core/base/tablet_pipe.h
+++ b/ydb/core/base/tablet_pipe.h
@@ -69,7 +69,7 @@ namespace NKikimr {
TEvPush() {}
TEvPush(ui64 tabletId, ui32 type, const TActorId& sender, const TIntrusivePtr<TEventSerializedData>& buffer,
- ui64 cookie, TEventSerializationInfo&& serializationInfo, bool supportsDataInPayload)
+ ui64 cookie, bool extendedFormat, bool supportsDataInPayload)
{
Record.SetTabletId(tabletId);
Record.SetType(type);
@@ -80,7 +80,7 @@ namespace NKikimr {
Record.SetBuffer(buffer->GetString());
}
Record.SetCookie(cookie);
- Record.SetExtendedFormat(serializationInfo.IsExtendedFormat);
+ Record.SetExtendedFormat(extendedFormat);
}
void SetSeqNo(ui64 seqNo) {
diff --git a/ydb/core/blobstorage/ut_vdisk/lib/test_synclog.cpp b/ydb/core/blobstorage/ut_vdisk/lib/test_synclog.cpp
index b3dde08554..04a821a497 100644
--- a/ydb/core/blobstorage/ut_vdisk/lib/test_synclog.cpp
+++ b/ydb/core/blobstorage/ut_vdisk/lib/test_synclog.cpp
@@ -65,7 +65,7 @@ class TDataWriterActor : public TActorBootstrapped<TDataWriterActor> {
TEvBlobStorage::TEvVBlock logCmd(tabletId, Generation, TestCtx->SelfVDiskId, TInstant::Max());
TAllocChunkSerializer serializer;
logCmd.SerializeToArcadiaStream(&serializer);
- TIntrusivePtr<TEventSerializedData> buffers = serializer.Release(logCmd.CreateSerializationInfo());
+ TIntrusivePtr<TEventSerializedData> buffers = serializer.Release(logCmd.IsExtendedFormat());
ctx.Send(TestCtx->LoggerId,
new NPDisk::TEvLog(TestCtx->PDiskCtx->Dsk->Owner, TestCtx->PDiskCtx->Dsk->OwnerRound,
TLogSignature::SignatureBlock, TRcBuf(buffers->GetString()), seg, nullptr));
diff --git a/ydb/core/kqp/common/kqp.h b/ydb/core/kqp/common/kqp.h
index e4161d225a..c5f58bd925 100644
--- a/ydb/core/kqp/common/kqp.h
+++ b/ydb/core/kqp/common/kqp.h
@@ -269,8 +269,10 @@ struct TEvKqp {
return true;
}
- // Same as TEventPBBase but without Rope (but can contain Payload and will lose some data after all)
- TEventSerializationInfo CreateSerializationInfo() const override { return {}; }
+ // Same as TEventPBBase but without Rope
+ bool IsExtendedFormat() const override {
+ return false;
+ }
ui64 GetRequestSize() const {
return Record.GetRequest().ByteSizeLong();
diff --git a/ydb/core/tablet/tablet_pipe_client.cpp b/ydb/core/tablet/tablet_pipe_client.cpp
index fc46832777..55df667343 100644
--- a/ydb/core/tablet/tablet_pipe_client.cpp
+++ b/ydb/core/tablet/tablet_pipe_client.cpp
@@ -578,11 +578,11 @@ namespace NTabletPipe {
Y_VERIFY(Event, "Sending an empty event without a buffer");
TAllocChunkSerializer serializer;
Event->SerializeToArcadiaStream(&serializer);
- Buffer = serializer.Release(Event->CreateSerializationInfo());
+ Buffer = serializer.Release(Event->IsExtendedFormat());
}
auto msg = MakeHolder<TEvTabletPipe::TEvPush>(tabletId, Type, Sender, Buffer, cookie,
- Buffer->ReleaseSerializationInfo(), supportsDataInPayload);
+ Buffer->IsExtendedFormat(), supportsDataInPayload);
if (SeqNo) {
msg->SetSeqNo(SeqNo);
diff --git a/ydb/core/tablet/tablet_pipe_server.cpp b/ydb/core/tablet/tablet_pipe_server.cpp
index ca6a67bc8f..2a4b14a900 100644
--- a/ydb/core/tablet/tablet_pipe_server.cpp
+++ b/ydb/core/tablet/tablet_pipe_server.cpp
@@ -74,12 +74,9 @@ namespace NTabletPipe {
}
Y_VERIFY(!msg.GetPayloadCount() || (msg.GetPayloadCount() == 1 && !record.HasBuffer()));
- TEventSerializationInfo serializationInfo{
- .IsExtendedFormat = record.GetExtendedFormat(),
- };
auto buffer = msg.GetPayloadCount()
- ? MakeIntrusive<TEventSerializedData>(TRope(msg.GetPayload(0)), std::move(serializationInfo))
- : MakeIntrusive<TEventSerializedData>(record.GetBuffer(), std::move(serializationInfo));
+ ? MakeIntrusive<TEventSerializedData>(TRope(msg.GetPayload(0)), record.GetExtendedFormat())
+ : MakeIntrusive<TEventSerializedData>(record.GetBuffer(), record.GetExtendedFormat());
auto result = std::make_unique<IEventHandle>(
ev->InterconnectSession,
diff --git a/ydb/core/test_tablet/state_server_interface.cpp b/ydb/core/test_tablet/state_server_interface.cpp
index 8839763725..79ff3d223f 100644
--- a/ydb/core/test_tablet/state_server_interface.cpp
+++ b/ydb/core/test_tablet/state_server_interface.cpp
@@ -153,7 +153,7 @@ namespace NKikimr::NTestShard {
Y_VERIFY(type);
ResponseQ.push_back(TResponseInfo{ev->Sender, ev->Cookie, type});
auto buffers = ev->ReleaseChainBuffer();
- Y_VERIFY(!buffers->GetSerializationInfo().IsExtendedFormat);
+ Y_VERIFY(!buffers->IsExtendedFormat());
const ui32 len = buffers->GetSize();
Y_VERIFY(len <= 64 * 1024 * 1024);
TString w = TString::Uninitialized(sizeof(ui32) + len);
@@ -170,8 +170,7 @@ namespace NKikimr::NTestShard {
Y_VERIFY(!ResponseQ.empty());
TResponseInfo& response = ResponseQ.front();
TActivationContext::Send(new IEventHandle(response.Type, 0, response.Sender, self->SelfId(),
- MakeIntrusive<TEventSerializedData>(std::move(ReadBuffer), TEventSerializationInfo{}),
- response.Cookie));
+ MakeIntrusive<TEventSerializedData>(std::move(ReadBuffer), false), response.Cookie));
ResponseQ.pop_front();
}
diff --git a/ydb/core/testlib/fake_coordinator.h b/ydb/core/testlib/fake_coordinator.h
index b9aa1ca813..b3098d60a5 100644
--- a/ydb/core/testlib/fake_coordinator.h
+++ b/ydb/core/testlib/fake_coordinator.h
@@ -212,7 +212,7 @@ namespace NKikimr {
ev->SerializeToArcadiaStream(&serializer);
Cerr << "FAKE_COORDINATOR: Send Plan to tablet " << tabletId << " for txId: " << ev->Record.GetTransactions(0).GetTxId() << " at step: " << step << "\n";
- Pipes->Send(ctx, tabletId, ev->EventType, serializer.Release(ev->CreateSerializationInfo()));
+ Pipes->Send(ctx, tabletId, ev->EventType, serializer.Release(ev->IsExtendedFormat()));
}
}
}
diff --git a/ydb/core/tx/mediator/tablet_queue.cpp b/ydb/core/tx/mediator/tablet_queue.cpp
index fa05f7acd2..3878119294 100644
--- a/ydb/core/tx/mediator/tablet_queue.cpp
+++ b/ydb/core/tx/mediator/tablet_queue.cpp
@@ -121,7 +121,7 @@ class TTxMediatorTabletQueue : public TActor<TTxMediatorTabletQueue> {
TAllocChunkSerializer serializer;
const bool success = evx.SerializeToArcadiaStream(&serializer);
Y_VERIFY(success);
- TIntrusivePtr<TEventSerializedData> data = serializer.Release(evx.CreateSerializationInfo());
+ TIntrusivePtr<TEventSerializedData> data = serializer.Release(evx.IsExtendedFormat());
// todo: we must throttle delivery
const ui32 sendFlags = IEventHandle::FlagTrackDelivery;
diff --git a/ydb/core/tx/scheme_board/helpers.cpp b/ydb/core/tx/scheme_board/helpers.cpp
index add1b5a460..3b53323ad3 100644
--- a/ydb/core/tx/scheme_board/helpers.cpp
+++ b/ydb/core/tx/scheme_board/helpers.cpp
@@ -84,7 +84,7 @@ TSet<ui64> GetAbandonedSchemeShardIds(const NKikimrScheme::TEvDescribeSchemeResu
TIntrusivePtr<TEventSerializedData> SerializeEvent(IEventBase* ev) {
TAllocChunkSerializer serializer;
Y_VERIFY(ev->SerializeToArcadiaStream(&serializer));
- return serializer.Release(ev->CreateSerializationInfo());
+ return serializer.Release(ev->IsExtendedFormat());
}
void MultiSend(const TVector<const TActorId*>& recipients, const TActorId& sender, TAutoPtr<IEventBase> ev, ui32 flags, ui64 cookie) {
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_side_effects.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_side_effects.cpp
index e0ab1cecde..2cde5a9ce7 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_side_effects.cpp
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_side_effects.cpp
@@ -617,7 +617,7 @@ void TSideEffects::DoBindMsg(TSchemeShard *ss, const TActorContext &ctx) {
TAllocChunkSerializer serializer;
const bool success = message->SerializeToArcadiaStream(&serializer);
Y_VERIFY(success);
- TIntrusivePtr<TEventSerializedData> data = serializer.Release(message->CreateSerializationInfo());
+ TIntrusivePtr<TEventSerializedData> data = serializer.Release(message->IsExtendedFormat());
operation->PipeBindedMessages[tablet][cookie] = TOperation::TPreSerializedMessage(msgType, data, opId);
ss->PipeClientCache->Send(ctx, ui64(tablet), msgType, data, cookie.second);
diff --git a/ydb/core/tx/schemeshard/ut_helpers/test_env.cpp b/ydb/core/tx/schemeshard/ut_helpers/test_env.cpp
index 28e5a8285e..16918116d7 100644
--- a/ydb/core/tx/schemeshard/ut_helpers/test_env.cpp
+++ b/ydb/core/tx/schemeshard/ut_helpers/test_env.cpp
@@ -475,7 +475,7 @@ private:
TAllocChunkSerializer serializer;
const bool success = message->SerializeToArcadiaStream(&serializer);
Y_VERIFY(success);
- TIntrusivePtr<TEventSerializedData> data = serializer.Release(message->CreateSerializationInfo());
+ TIntrusivePtr<TEventSerializedData> data = serializer.Release(message->IsExtendedFormat());
return TPreSerializedMessage(message->Type(), data);
}