Skip to content

Commit f74adc0

Browse files
authored
Switch SyncLog to modern entrypoint format (#6590)
1 parent d0aff76 commit f74adc0

24 files changed

+25
-107
lines changed

ydb/core/base/compile_time_flags.h

Lines changed: 0 additions & 9 deletions
This file was deleted.

ydb/core/base/localdb.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "localdb.h"
2-
#include "compile_time_flags.h"
32

43
#include <ydb/core/protos/resource_broker.pb.h>
54

ydb/core/base/statestorage_guardian.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "tablet.h"
55

66
#include <ydb/core/base/appdata.h>
7-
#include <ydb/core/base/compile_time_flags.h>
87
#include <ydb/library/services/services.pb.h>
98

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

ydb/core/base/statestorage_proxy.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "statestorage_impl.h"
22
#include "tabletid.h"
33

4-
#include <ydb/core/base/compile_time_flags.h>
54
#include <ydb/library/services/services.pb.h>
65

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

ydb/core/blobstorage/pdisk/blobstorage_pdisk_config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include "defs.h"
33

44
#include <ydb/core/base/blobstorage.h>
5-
#include <ydb/core/base/compile_time_flags.h>
65
#include <ydb/core/blobstorage/base/vdisk_priorities.h>
76
#include <ydb/core/control/immediate_control_board_wrapper.h>
87
#include <ydb/core/protos/blobstorage.pb.h>

ydb/core/blobstorage/pdisk/blobstorage_pdisk_crypto.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#pragma once
22
#include "defs.h"
33

4-
#include <ydb/core/base/compile_time_flags.h>
54
#include <ydb/core/blobstorage/crypto/crypto.h>
65

76
namespace NKikimr {

ydb/core/blobstorage/pdisk/blobstorage_pdisk_ut_run.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "blobstorage_pdisk_ut_config.h"
55
#include "blobstorage_pdisk_ut_context.h"
66

7-
#include <ydb/core/base/compile_time_flags.h>
87
#include <ydb/core/base/services/blobstorage_service_id.h>
98

109
#include <util/folder/tempdir.h>

ydb/core/blobstorage/pdisk/blobstorage_pdisk_writer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "blobstorage_pdisk_mon.h"
1010
#include "blobstorage_pdisk_request_id.h"
1111

12-
#include <ydb/core/base/compile_time_flags.h>
1312
#include <ydb/core/blobstorage/crypto/crypto.h>
1413

1514
#include <util/generic/deque.h>

ydb/core/blobstorage/vdisk/common/vdisk_events.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <ydb/core/blobstorage/storagepoolmon/storagepool_counters.h>
1616
#include <ydb/core/base/blobstorage_common.h>
1717

18-
#include <ydb/core/base/compile_time_flags.h>
1918
#include <ydb/core/base/event_filter.h>
2019
#include <ydb/core/base/interconnect_channels.h>
2120
#include <ydb/core/protos/blobstorage_config.pb.h>

ydb/core/blobstorage/vdisk/synclog/blobstorage_synclogdata.cpp

Lines changed: 10 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ namespace NKikimr {
431431
, ChunksToDeleteDelayed(std::move(chunksToDeleteDelayed))
432432
{}
433433

434-
void TEntryPointSerializer::Serialize(const TDeltaToDiskRecLog &delta, bool oldFormat) {
434+
void TEntryPointSerializer::Serialize(const TDeltaToDiskRecLog &delta) {
435435
// fill in the protobuf
436436
NKikimrVDiskData::TSyncLogEntryPoint pb;
437437
pb.SetRecoveryLogConfirmedLsn(RecoveryLogConfirmedLsn);
@@ -441,48 +441,22 @@ namespace NKikimr {
441441
}
442442
const ui32 indexRecsNum = SyncLogSnap->SerializeToProto(pb, delta);
443443
// produce serialized data for the entry point
444-
SerializedData = Serialize(pb, oldFormat);
444+
SerializedData = Serialize(pb);
445445

446446
// fill in EntryPointDbgInfo
447447
EntryPointDbgInfo = TEntryPointDbgInfo(SerializedData.size(),
448448
ChunksToDeleteDelayed.size(),
449449
indexRecsNum);
450450
}
451451

452-
TString TEntryPointSerializer::Serialize(const NKikimrVDiskData::TSyncLogEntryPoint &pb, bool oldFormat) {
453-
if (oldFormat) {
454-
TStringStream s;
455-
// Header
456-
const ui32 reservedData = 0;
457-
const ui32 signature = TSyncLogHeader::SyncLogOldSignature;
458-
s.Write(&signature, sizeof(signature));
459-
s.Write(&reservedData, sizeof(reservedData));
460-
const ui64 pdiskGuid = pb.GetPDiskGuid();
461-
s.Write(&pdiskGuid, sizeof(pdiskGuid));
462-
const ui64 vdiskIncarnationGuid = pb.GetVDiskIncarnationGuid();
463-
s.Write(&vdiskIncarnationGuid, sizeof(vdiskIncarnationGuid));
464-
// LogStartLsn
465-
const ui64 logStartLsn = pb.GetLogStartLsn();
466-
s.Write(&logStartLsn, sizeof(logStartLsn));
467-
// chunksToDeleteDelayed
468-
const ui32 delChunksSize = pb.ChunksToDeleteDelayedSize();
469-
s.Write(&delChunksSize, sizeof(delChunksSize));
470-
for (ui64 i = 0; i < delChunksSize; ++i) {
471-
const ui32 chunkId = pb.GetChunksToDeleteDelayed(i);
472-
s.Write(&chunkId, sizeof(chunkId));
473-
}
474-
s.Write(pb.GetDiskRecLogSerialized().data(), pb.GetDiskRecLogSerialized().size());
475-
476-
return s.Str();
477-
} else {
478-
// signature
479-
TStringStream s;
480-
s.Write(&TSyncLogHeader::SyncLogPbSignature, sizeof(ui32));
481-
// pb payload
482-
bool success = pb.SerializeToArcadiaStream(&s);
483-
Y_ABORT_UNLESS(success);
484-
return s.Str();
485-
}
452+
TString TEntryPointSerializer::Serialize(const NKikimrVDiskData::TSyncLogEntryPoint &pb) {
453+
// signature
454+
TStringStream s;
455+
s.Write(&TSyncLogHeader::SyncLogPbSignature, sizeof(ui32));
456+
// pb payload
457+
bool success = pb.SerializeToArcadiaStream(&s);
458+
Y_ABORT_UNLESS(success);
459+
return s.Str();
486460
}
487461

488462
////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)