Skip to content

Commit 80bdd02

Browse files
committed
Rename checksum to cumulative checksum
1 parent ade9f81 commit 80bdd02

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

ydb/library/actors/interconnect/interconnect_channel.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ namespace NActors {
104104
} else if (Params.UseExternalDataChannel && !SerializationInfo->Sections.empty()) {
105105
State = EState::SECTIONS;
106106
SectionIndex = 0;
107-
XXH3_64bits_reset(&RdmaChecksumState);
107+
XXH3_64bits_reset(&RdmaCumulativeChecksumState);
108108

109109
bool sendViaRdma = false;
110110
// Check if any section can be send via rdma
@@ -352,7 +352,7 @@ namespace NActors {
352352
return false;
353353
}
354354
if (checksumming) {
355-
XXH3_64bits_update(&RdmaChecksumState, buf.GetData(), buf.GetSize());
355+
XXH3_64bits_update(&RdmaCumulativeChecksumState, buf.GetData(), buf.GetSize());
356356
}
357357
auto cred = RdmaCredsBuffer.AddCreds();
358358
cred->SetAddress(reinterpret_cast<ui64>(memReg.GetAddr()));
@@ -393,7 +393,7 @@ namespace NActors {
393393

394394
Y_ABORT_UNLESS(RdmaCredsBuffer.SerializePartialToArray(ptr, credsSerializedSize));
395395
ptr += credsSerializedSize;
396-
WriteUnaligned<ui32>(ptr, checksumming ? XXH3_64bits_digest(&RdmaChecksumState) : 0);
396+
WriteUnaligned<ui32>(ptr, checksumming ? XXH3_64bits_digest(&RdmaCumulativeChecksumState) : 0);
397397
OutputQueueSize -= payloadSz;
398398

399399
task.Write<false>(buffer, partSize);

ydb/library/actors/interconnect/interconnect_channel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ namespace NActors {
152152
size_t SectionIndex = 0;
153153
std::vector<char> XdcData;
154154
std::shared_ptr<NInterconnect::NRdma::IMemPool> RdmaMemPool;
155-
XXH3_state_t RdmaChecksumState;
155+
XXH3_state_t RdmaCumulativeChecksumState;
156156

157157
template<bool External>
158158
bool SerializeEvent(TTcpPacketOutTask& task, TEventHolder& event, size_t *bytesSerialized);

ydb/library/actors/interconnect/interconnect_tcp_input_session.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -803,9 +803,9 @@ namespace NActors {
803803
Y_ABORT_UNLESS(creds.ParseFromArray(ptr, credsSerializedSize));
804804
ptr += credsSerializedSize;
805805
if (Params.ChecksumRdmaEvent) {
806-
context.PendingEvents.back().RdmaCheckSum = ReadUnaligned<ui32>(ptr);
806+
context.PendingEvents.back().RdmaCumulativeCheckSum = ReadUnaligned<ui32>(ptr);
807807
} else {
808-
context.PendingEvents.back().RdmaCheckSum = 0;
808+
context.PendingEvents.back().RdmaCumulativeCheckSum = 0;
809809
}
810810
ptr += sizeof(ui32);
811811
auto err = context.ScheduleRdmaReadRequests(creds, RdmaCq, SelfId(), channel);
@@ -903,7 +903,7 @@ namespace NActors {
903903
throw TExReestablishConnection{TDisconnectReason::ChecksumError()};
904904
}
905905
}
906-
if (pendingEvent.RdmaCheckSum) {
906+
if (pendingEvent.RdmaCumulativeCheckSum) {
907907
XXH3_state_t state;
908908
XXH3_64bits_reset(&state);
909909
for (auto iter = payload.Begin(); iter.Valid(); ++iter) {
@@ -913,7 +913,7 @@ namespace NActors {
913913
}
914914
}
915915
checksum = XXH3_64bits_digest(&state);
916-
if (checksum != pendingEvent.RdmaCheckSum) {
916+
if (checksum != pendingEvent.RdmaCumulativeCheckSum) {
917917
LOG_CRIT_IC_SESSION("ICIS05", "event rdma checksum error Type# 0x%08" PRIx32, descr.Type);
918918
throw TExReestablishConnection{TDisconnectReason::ChecksumError()};
919919
}

ydb/library/actors/interconnect/interconnect_tcp_session.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ namespace NActors {
155155
std::deque<NInterconnect::NRdma::TMemRegionSlice> RdmaBuffers;
156156
TRdmaReadContext::TPtr RdmaReadContext = nullptr;
157157
size_t RdmaSize = 0;
158-
ui32 RdmaCheckSum = 0;
158+
ui32 RdmaCumulativeCheckSum = 0;
159159
};
160160

161161
std::deque<TPendingEvent> PendingEvents;

0 commit comments

Comments
 (0)