YugabyteDB (2.13.0.0-b42, bfc6a6643e7399ac8a0e81d06a3ee6d6571b33ab)

Coverage Report

Created: 2022-03-09 17:30

/Users/deen/code/yugabyte-db/build/debugcov-clang-dynamic-arm64-ninja/src/yb/consensus/log.pb.cc
Line
Count
Source (jump to first uncovered line)
1
// Generated by the protocol buffer compiler.  DO NOT EDIT!
2
// source: yb/consensus/log.proto
3
4
#include "yb/consensus/log.pb.h"
5
6
#include <algorithm>
7
8
#include <google/protobuf/stubs/common.h>
9
#include <google/protobuf/stubs/port.h>
10
#include <google/protobuf/stubs/once.h>
11
#include <google/protobuf/io/coded_stream.h>
12
#include <google/protobuf/wire_format_lite_inl.h>
13
#include <google/protobuf/descriptor.h>
14
#include <google/protobuf/generated_message_reflection.h>
15
#include <google/protobuf/reflection_ops.h>
16
#include <google/protobuf/wire_format.h>
17
// This is a temporary google only hack
18
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
19
#include "third_party/protobuf/version.h"
20
#endif
21
#include "yb/util/protobuf-annotations.h"
22
// @@protoc_insertion_point(includes)
23
namespace yb {
24
namespace log {
25
class LogEntryPBDefaultTypeInternal {
26
 public:
27
  ::google::protobuf::internal::ExplicitlyConstructed<LogEntryPB>
28
      _instance;
29
} _LogEntryPB_default_instance_;
30
class LogEntryBatchPBDefaultTypeInternal {
31
 public:
32
  ::google::protobuf::internal::ExplicitlyConstructed<LogEntryBatchPB>
33
      _instance;
34
} _LogEntryBatchPB_default_instance_;
35
class LogSegmentHeaderPBDefaultTypeInternal {
36
 public:
37
  ::google::protobuf::internal::ExplicitlyConstructed<LogSegmentHeaderPB>
38
      _instance;
39
} _LogSegmentHeaderPB_default_instance_;
40
class LogSegmentFooterPBDefaultTypeInternal {
41
 public:
42
  ::google::protobuf::internal::ExplicitlyConstructed<LogSegmentFooterPB>
43
      _instance;
44
} _LogSegmentFooterPB_default_instance_;
45
}  // namespace log
46
}  // namespace yb
47
namespace protobuf_yb_2fconsensus_2flog_2eproto {
48
11.2k
void InitDefaultsLogEntryPBImpl() {
49
11.2k
  GOOGLE_PROTOBUF_VERIFY_VERSION;
50
51
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
52
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
53
#else
54
11.2k
  ::google::protobuf::internal::InitProtobufDefaults();
55
11.2k
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
56
11.2k
  protobuf_yb_2fconsensus_2fconsensus_2eproto::InitDefaultsReplicateMsg();
57
11.2k
  {
58
11.2k
    void* ptr = &::yb::log::_LogEntryPB_default_instance_;
59
11.2k
    new (ptr) ::yb::log::LogEntryPB();
60
11.2k
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
61
11.2k
  }
62
11.2k
  ::yb::log::LogEntryPB::InitAsDefaultInstance();
63
11.2k
}
64
65
10.2M
void InitDefaultsLogEntryPB() {
66
10.2M
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
67
10.2M
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsLogEntryPBImpl);
68
10.2M
}
69
70
11.2k
void InitDefaultsLogEntryBatchPBImpl() {
71
11.2k
  GOOGLE_PROTOBUF_VERIFY_VERSION;
72
73
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
74
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
75
#else
76
11.2k
  ::google::protobuf::internal::InitProtobufDefaults();
77
11.2k
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
78
11.2k
  protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogEntryPB();
79
11.2k
  protobuf_yb_2futil_2fopid_2eproto::InitDefaultsOpIdPB();
80
11.2k
  {
81
11.2k
    void* ptr = &::yb::log::_LogEntryBatchPB_default_instance_;
82
11.2k
    new (ptr) ::yb::log::LogEntryBatchPB();
83
11.2k
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
84
11.2k
  }
85
11.2k
  ::yb::log::LogEntryBatchPB::InitAsDefaultInstance();
86
11.2k
}
87
88
34.4M
void InitDefaultsLogEntryBatchPB() {
89
34.4M
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
90
34.4M
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsLogEntryBatchPBImpl);
91
34.4M
}
92
93
11.2k
void InitDefaultsLogSegmentHeaderPBImpl() {
94
11.2k
  GOOGLE_PROTOBUF_VERIFY_VERSION;
95
96
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
97
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
98
#else
99
11.2k
  ::google::protobuf::internal::InitProtobufDefaults();
100
11.2k
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
101
11.2k
  protobuf_yb_2fcommon_2fcommon_2eproto::InitDefaultsSchemaPB();
102
11.2k
  {
103
11.2k
    void* ptr = &::yb::log::_LogSegmentHeaderPB_default_instance_;
104
11.2k
    new (ptr) ::yb::log::LogSegmentHeaderPB();
105
11.2k
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
106
11.2k
  }
107
11.2k
  ::yb::log::LogSegmentHeaderPB::InitAsDefaultInstance();
108
11.2k
}
109
110
376k
void InitDefaultsLogSegmentHeaderPB() {
111
376k
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
112
376k
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsLogSegmentHeaderPBImpl);
113
376k
}
114
115
11.2k
void InitDefaultsLogSegmentFooterPBImpl() {
116
11.2k
  GOOGLE_PROTOBUF_VERIFY_VERSION;
117
118
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
119
  ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
120
#else
121
11.2k
  ::google::protobuf::internal::InitProtobufDefaults();
122
11.2k
#endif  // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
123
11.2k
  {
124
11.2k
    void* ptr = &::yb::log::_LogSegmentFooterPB_default_instance_;
125
11.2k
    new (ptr) ::yb::log::LogSegmentFooterPB();
126
11.2k
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
127
11.2k
  }
128
11.2k
  ::yb::log::LogSegmentFooterPB::InitAsDefaultInstance();
129
11.2k
}
130
131
365k
void InitDefaultsLogSegmentFooterPB() {
132
365k
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
133
365k
  ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsLogSegmentFooterPBImpl);
134
365k
}
135
136
::google::protobuf::Metadata file_level_metadata[4];
137
const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
138
139
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
140
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryPB, _has_bits_),
141
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryPB, _internal_metadata_),
142
  ~0u,  // no _extensions_
143
  ~0u,  // no _oneof_case_
144
  ~0u,  // no _weak_field_map_
145
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryPB, type_),
146
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryPB, replicate_),
147
  1,
148
  0,
149
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryBatchPB, _has_bits_),
150
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryBatchPB, _internal_metadata_),
151
  ~0u,  // no _extensions_
152
  ~0u,  // no _oneof_case_
153
  ~0u,  // no _weak_field_map_
154
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryBatchPB, entry_),
155
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryBatchPB, committed_op_id_),
156
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogEntryBatchPB, mono_time_),
157
  ~0u,
158
  0,
159
  1,
160
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, _has_bits_),
161
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, _internal_metadata_),
162
  ~0u,  // no _extensions_
163
  ~0u,  // no _oneof_case_
164
  ~0u,  // no _weak_field_map_
165
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, major_version_),
166
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, minor_version_),
167
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, unused_tablet_id_),
168
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, sequence_number_),
169
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, unused_schema_),
170
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentHeaderPB, unused_schema_version_),
171
  2,
172
  3,
173
  0,
174
  4,
175
  1,
176
  5,
177
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentFooterPB, _has_bits_),
178
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentFooterPB, _internal_metadata_),
179
  ~0u,  // no _extensions_
180
  ~0u,  // no _oneof_case_
181
  ~0u,  // no _weak_field_map_
182
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentFooterPB, num_entries_),
183
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentFooterPB, min_replicate_index_),
184
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentFooterPB, max_replicate_index_),
185
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::yb::log::LogSegmentFooterPB, close_timestamp_micros_),
186
  0,
187
  2,
188
  3,
189
  1,
190
};
191
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
192
  { 0, 7, sizeof(::yb::log::LogEntryPB)},
193
  { 9, 17, sizeof(::yb::log::LogEntryBatchPB)},
194
  { 20, 31, sizeof(::yb::log::LogSegmentHeaderPB)},
195
  { 37, 46, sizeof(::yb::log::LogSegmentFooterPB)},
196
};
197
198
static ::google::protobuf::Message const * const file_default_instances[] = {
199
  reinterpret_cast<const ::google::protobuf::Message*>(&::yb::log::_LogEntryPB_default_instance_),
200
  reinterpret_cast<const ::google::protobuf::Message*>(&::yb::log::_LogEntryBatchPB_default_instance_),
201
  reinterpret_cast<const ::google::protobuf::Message*>(&::yb::log::_LogSegmentHeaderPB_default_instance_),
202
  reinterpret_cast<const ::google::protobuf::Message*>(&::yb::log::_LogSegmentFooterPB_default_instance_),
203
};
204
205
86
void protobuf_AssignDescriptors() {
206
86
  AddDescriptors();
207
86
  ::google::protobuf::MessageFactory* factory = NULL;
208
86
  AssignDescriptors(
209
86
      "yb/consensus/log.proto", schemas, file_default_instances, TableStruct::offsets, factory,
210
86
      file_level_metadata, file_level_enum_descriptors, NULL);
211
86
}
212
213
6.58k
void protobuf_AssignDescriptorsOnce() {
214
6.58k
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
215
6.58k
  ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
216
6.58k
}
217
218
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
219
0
void protobuf_RegisterTypes(const ::std::string&) {
220
0
  protobuf_AssignDescriptorsOnce();
221
0
  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 4);
222
0
}
223
224
11.2k
void AddDescriptorsImpl() {
225
11.2k
  InitDefaults();
226
11.2k
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
227
11.2k
      "\n\026yb/consensus/log.proto\022\006yb.log\032\026yb/com"
228
11.2k
      "mon/common.proto\032\034yb/consensus/consensus"
229
11.2k
      ".proto\032\022yb/util/opid.proto\"a\n\nLogEntryPB"
230
11.2k
      "\022$\n\004type\030\001 \002(\0162\026.yb.log.LogEntryTypePB\022-"
231
11.2k
      "\n\treplicate\030\002 \001(\0132\032.yb.consensus.Replica"
232
11.2k
      "teMsg\"l\n\017LogEntryBatchPB\022!\n\005entry\030\001 \003(\0132"
233
11.2k
      "\022.yb.log.LogEntryPB\022#\n\017committed_op_id\030\002"
234
11.2k
      " \001(\0132\n.yb.OpIdPB\022\021\n\tmono_time\030\003 \001(\004\"\271\001\n\022"
235
11.2k
      "LogSegmentHeaderPB\022\025\n\rmajor_version\030\001 \002("
236
11.2k
      "\r\022\025\n\rminor_version\030\002 \002(\r\022\030\n\020unused_table"
237
11.2k
      "t_id\030\005 \002(\014\022\027\n\017sequence_number\030\006 \002(\004\022#\n\ru"
238
11.2k
      "nused_schema\030\007 \002(\0132\014.yb.SchemaPB\022\035\n\025unus"
239
11.2k
      "ed_schema_version\030\010 \001(\r\"\213\001\n\022LogSegmentFo"
240
11.2k
      "oterPB\022\023\n\013num_entries\030\001 \002(\003\022\037\n\023min_repli"
241
11.2k
      "cate_index\030\002 \001(\003:\002-1\022\037\n\023max_replicate_in"
242
11.2k
      "dex\030\003 \001(\003:\002-1\022\036\n\026close_timestamp_micros\030"
243
11.2k
      "\004 \001(\003*U\n\016LogEntryTypePB\022\013\n\007UNKNOWN\020\000\022\r\n\t"
244
11.2k
      "REPLICATE\020\001\022\024\n\017ROLLOVER_MARKER\020\346\007\022\021\n\014FLU"
245
11.2k
      "SH_MARKER\020\347\007B\014\n\norg.yb.log"
246
11.2k
  };
247
11.2k
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
248
11.2k
      descriptor, 746);
249
11.2k
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
250
11.2k
    "yb/consensus/log.proto", &protobuf_RegisterTypes);
251
11.2k
  ::protobuf_yb_2fcommon_2fcommon_2eproto::AddDescriptors();
252
11.2k
  ::protobuf_yb_2fconsensus_2fconsensus_2eproto::AddDescriptors();
253
11.2k
  ::protobuf_yb_2futil_2fopid_2eproto::AddDescriptors();
254
11.2k
}
255
256
11.3k
void AddDescriptors() {
257
11.3k
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
258
11.3k
  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
259
11.3k
}
260
// Force AddDescriptors() to be called at dynamic initialization time.
261
struct StaticDescriptorInitializer {
262
11.2k
  StaticDescriptorInitializer() {
263
11.2k
    AddDescriptors();
264
11.2k
  }
265
} static_descriptor_initializer;
266
}  // namespace protobuf_yb_2fconsensus_2flog_2eproto
267
namespace yb {
268
namespace log {
269
3.75k
const ::google::protobuf::EnumDescriptor* LogEntryTypePB_descriptor() {
270
3.75k
  protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce();
271
3.75k
  return protobuf_yb_2fconsensus_2flog_2eproto::file_level_enum_descriptors[0];
272
3.75k
}
273
11.6M
bool LogEntryTypePB_IsValid(int value) {
274
11.6M
  switch (value) {
275
0
    case 0:
276
11.6M
    case 1:
277
11.6M
    case 998:
278
11.6M
    case 999:
279
11.6M
      return true;
280
0
    default:
281
0
      return false;
282
11.6M
  }
283
11.6M
}
284
285
286
// ===================================================================
287
288
11.2k
void LogEntryPB::InitAsDefaultInstance() {
289
11.2k
  ::yb::log::_LogEntryPB_default_instance_._instance.get_mutable()->replicate_ = const_cast< ::yb::consensus::ReplicateMsg*>(
290
11.2k
      ::yb::consensus::ReplicateMsg::internal_default_instance());
291
11.2k
}
292
0
void LogEntryPB::clear_replicate() {
293
0
  if (replicate_ != NULL) replicate_->Clear();
294
0
  clear_has_replicate();
295
0
}
296
#if !defined(_MSC_VER) || _MSC_VER >= 1900
297
const int LogEntryPB::kTypeFieldNumber;
298
const int LogEntryPB::kReplicateFieldNumber;
299
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
300
301
LogEntryPB::LogEntryPB()
302
10.1M
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
303
10.1M
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
304
10.1M
    ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogEntryPB();
305
10.1M
  }
306
10.1M
  SharedCtor();
307
  // @@protoc_insertion_point(constructor:yb.log.LogEntryPB)
308
10.1M
}
309
LogEntryPB::LogEntryPB(const LogEntryPB& from)
310
  : ::google::protobuf::Message(),
311
      _internal_metadata_(NULL),
312
      _has_bits_(from._has_bits_),
313
0
      _cached_size_(0) {
314
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
315
0
  if (from.has_replicate()) {
316
0
    replicate_ = new ::yb::consensus::ReplicateMsg(*from.replicate_);
317
0
  } else {
318
0
    replicate_ = NULL;
319
0
  }
320
0
  type_ = from.type_;
321
  // @@protoc_insertion_point(copy_constructor:yb.log.LogEntryPB)
322
0
}
323
324
10.1M
void LogEntryPB::SharedCtor() {
325
10.1M
  _cached_size_ = 0;
326
10.1M
  ::memset(&replicate_, 0, static_cast<size_t>(
327
10.1M
      reinterpret_cast<char*>(&type_) -
328
10.1M
      reinterpret_cast<char*>(&replicate_)) + sizeof(type_));
329
10.1M
}
330
331
10.1M
LogEntryPB::~LogEntryPB() {
332
  // @@protoc_insertion_point(destructor:yb.log.LogEntryPB)
333
10.1M
  SharedDtor();
334
10.1M
}
335
336
10.1M
void LogEntryPB::SharedDtor() {
337
10.1M
  if (this != internal_default_instance()) delete replicate_;
338
10.1M
}
339
340
0
void LogEntryPB::SetCachedSize(int size) const {
341
0
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
342
0
  _cached_size_ = size;
343
0
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
344
0
}
345
0
const ::google::protobuf::Descriptor* LogEntryPB::descriptor() {
346
0
  ::protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce();
347
0
  return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
348
0
}
349
350
0
const LogEntryPB& LogEntryPB::default_instance() {
351
0
  ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogEntryPB();
352
0
  return *internal_default_instance();
353
0
}
354
355
0
LogEntryPB* LogEntryPB::New(::google::protobuf::Arena* arena) const {
356
0
  LogEntryPB* n = new LogEntryPB;
357
0
  if (arena != NULL) {
358
0
    arena->Own(n);
359
0
  }
360
0
  return n;
361
0
}
362
363
0
void LogEntryPB::Clear() {
364
// @@protoc_insertion_point(message_clear_start:yb.log.LogEntryPB)
365
0
  ::google::protobuf::uint32 cached_has_bits = 0;
366
  // Prevent compiler warnings about cached_has_bits being unused
367
0
  (void) cached_has_bits;
368
369
0
  cached_has_bits = _has_bits_[0];
370
0
  if (cached_has_bits & 0x00000001u) {
371
0
    GOOGLE_DCHECK(replicate_ != NULL);
372
0
    replicate_->Clear();
373
0
  }
374
0
  type_ = 0;
375
0
  _has_bits_.Clear();
376
0
  _internal_metadata_.Clear();
377
0
}
378
379
bool LogEntryPB::MergePartialFromCodedStream(
380
1.50M
    ::google::protobuf::io::CodedInputStream* input) {
381
3.00M
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
382
1.50M
  ::google::protobuf::uint32 tag;
383
  // @@protoc_insertion_point(parse_start:yb.log.LogEntryPB)
384
4.50M
  for (;;) {
385
4.50M
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
386
4.50M
    tag = p.first;
387
4.50M
    if (!p.second) goto handle_unusual;
388
3.00M
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
389
      // required .yb.log.LogEntryTypePB type = 1;
390
1.50M
      case 1: {
391
1.50M
        if (static_cast< ::google::protobuf::uint8>(tag) ==
392
1.50M
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
393
1.50M
          int value;
394
1.50M
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
395
1.50M
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
396
1.50M
                 input, &value)));
397
1.50M
          if (::yb::log::LogEntryTypePB_IsValid(value)) {
398
1.50M
            set_type(static_cast< ::yb::log::LogEntryTypePB >(value));
399
77
          } else {
400
77
            mutable_unknown_fields()->AddVarint(
401
77
                1, static_cast< ::google::protobuf::uint64>(value));
402
77
          }
403
0
        } else {
404
0
          goto handle_unusual;
405
0
        }
406
1.50M
        break;
407
1.50M
      }
408
409
      // optional .yb.consensus.ReplicateMsg replicate = 2;
410
1.50M
      case 2: {
411
1.50M
        if (static_cast< ::google::protobuf::uint8>(tag) ==
412
1.50M
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
413
1.50M
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
414
1.50M
               input, mutable_replicate()));
415
18.4E
        } else {
416
18.4E
          goto handle_unusual;
417
18.4E
        }
418
1.50M
        break;
419
1.50M
      }
420
421
0
      default: {
422
1.50M
      handle_unusual:
423
1.50M
        if (tag == 0) {
424
1.50M
          goto success;
425
1.50M
        }
426
18.4E
        DO_(::google::protobuf::internal::WireFormat::SkipField(
427
18.4E
              input, tag, _internal_metadata_.mutable_unknown_fields()));
428
18.4E
        break;
429
18.4E
      }
430
3.00M
    }
431
3.00M
  }
432
1.50M
success:
433
  // @@protoc_insertion_point(parse_success:yb.log.LogEntryPB)
434
1.50M
  return true;
435
0
failure:
436
  // @@protoc_insertion_point(parse_failure:yb.log.LogEntryPB)
437
0
  return false;
438
1.50M
#undef DO_
439
1.50M
}
440
441
void LogEntryPB::SerializeWithCachedSizes(
442
0
    ::google::protobuf::io::CodedOutputStream* output) const {
443
  // @@protoc_insertion_point(serialize_start:yb.log.LogEntryPB)
444
0
  ::google::protobuf::uint32 cached_has_bits = 0;
445
0
  (void) cached_has_bits;
446
447
0
  cached_has_bits = _has_bits_[0];
448
  // required .yb.log.LogEntryTypePB type = 1;
449
0
  if (cached_has_bits & 0x00000002u) {
450
0
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
451
0
      1, this->type(), output);
452
0
  }
453
454
  // optional .yb.consensus.ReplicateMsg replicate = 2;
455
0
  if (cached_has_bits & 0x00000001u) {
456
0
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
457
0
      2, *this->replicate_, output);
458
0
  }
459
460
0
  if (_internal_metadata_.have_unknown_fields()) {
461
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
462
0
        _internal_metadata_.unknown_fields(), output);
463
0
  }
464
  // @@protoc_insertion_point(serialize_end:yb.log.LogEntryPB)
465
0
}
466
467
::google::protobuf::uint8* LogEntryPB::InternalSerializeWithCachedSizesToArray(
468
8.67M
    bool deterministic, ::google::protobuf::uint8* target) const {
469
8.67M
  (void)deterministic; // Unused
470
  // @@protoc_insertion_point(serialize_to_array_start:yb.log.LogEntryPB)
471
8.67M
  ::google::protobuf::uint32 cached_has_bits = 0;
472
8.67M
  (void) cached_has_bits;
473
474
8.67M
  cached_has_bits = _has_bits_[0];
475
  // required .yb.log.LogEntryTypePB type = 1;
476
8.67M
  if (cached_has_bits & 0x00000002u) {
477
8.67M
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
478
8.67M
      1, this->type(), target);
479
8.67M
  }
480
481
  // optional .yb.consensus.ReplicateMsg replicate = 2;
482
8.67M
  if (cached_has_bits & 0x00000001u) {
483
8.67M
    target = ::google::protobuf::internal::WireFormatLite::
484
8.67M
      InternalWriteMessageToArray(
485
8.67M
        2, *this->replicate_, deterministic, target);
486
8.67M
  }
487
488
8.67M
  if (_internal_metadata_.have_unknown_fields()) {
489
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
490
0
        _internal_metadata_.unknown_fields(), target);
491
0
  }
492
  // @@protoc_insertion_point(serialize_to_array_end:yb.log.LogEntryPB)
493
8.67M
  return target;
494
8.67M
}
495
496
17.3M
size_t LogEntryPB::ByteSizeLong() const {
497
// @@protoc_insertion_point(message_byte_size_start:yb.log.LogEntryPB)
498
17.3M
  size_t total_size = 0;
499
500
17.3M
  if (_internal_metadata_.have_unknown_fields()) {
501
0
    total_size +=
502
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
503
0
        _internal_metadata_.unknown_fields());
504
0
  }
505
  // required .yb.log.LogEntryTypePB type = 1;
506
17.3M
  if (has_type()) {
507
17.3M
    total_size += 1 +
508
17.3M
      ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
509
17.3M
  }
510
  // optional .yb.consensus.ReplicateMsg replicate = 2;
511
17.3M
  if (has_replicate()) {
512
17.3M
    total_size += 1 +
513
17.3M
      ::google::protobuf::internal::WireFormatLite::MessageSize(
514
17.3M
        *this->replicate_);
515
17.3M
  }
516
517
17.3M
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
518
17.3M
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
519
17.3M
  _cached_size_ = cached_size;
520
17.3M
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
521
17.3M
  return total_size;
522
17.3M
}
523
524
0
void LogEntryPB::MergeFrom(const ::google::protobuf::Message& from) {
525
// @@protoc_insertion_point(generalized_merge_from_start:yb.log.LogEntryPB)
526
0
  GOOGLE_DCHECK_NE(&from, this);
527
0
  const LogEntryPB* source =
528
0
      ::google::protobuf::internal::DynamicCastToGenerated<const LogEntryPB>(
529
0
          &from);
530
0
  if (source == NULL) {
531
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.log.LogEntryPB)
532
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
533
0
  } else {
534
  // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.log.LogEntryPB)
535
0
    MergeFrom(*source);
536
0
  }
537
0
}
538
539
0
void LogEntryPB::MergeFrom(const LogEntryPB& from) {
540
// @@protoc_insertion_point(class_specific_merge_from_start:yb.log.LogEntryPB)
541
0
  GOOGLE_DCHECK_NE(&from, this);
542
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
543
0
  ::google::protobuf::uint32 cached_has_bits = 0;
544
0
  (void) cached_has_bits;
545
546
0
  cached_has_bits = from._has_bits_[0];
547
0
  if (cached_has_bits & 3u) {
548
0
    if (cached_has_bits & 0x00000001u) {
549
0
      mutable_replicate()->::yb::consensus::ReplicateMsg::MergeFrom(from.replicate());
550
0
    }
551
0
    if (cached_has_bits & 0x00000002u) {
552
0
      type_ = from.type_;
553
0
    }
554
0
    _has_bits_[0] |= cached_has_bits;
555
0
  }
556
0
}
557
558
0
void LogEntryPB::CopyFrom(const ::google::protobuf::Message& from) {
559
// @@protoc_insertion_point(generalized_copy_from_start:yb.log.LogEntryPB)
560
0
  if (&from == this) return;
561
0
  Clear();
562
0
  MergeFrom(from);
563
0
}
564
565
0
void LogEntryPB::CopyFrom(const LogEntryPB& from) {
566
// @@protoc_insertion_point(class_specific_copy_from_start:yb.log.LogEntryPB)
567
0
  if (&from == this) return;
568
0
  Clear();
569
0
  MergeFrom(from);
570
0
}
571
572
10.1M
bool LogEntryPB::IsInitialized() const {
573
10.1M
  if ((_has_bits_[0] & 0x00000002) != 0x00000002) return false;
574
10.1M
  if (has_replicate()) {
575
10.1M
    if (!this->replicate_->IsInitialized()) return false;
576
10.1M
  }
577
10.1M
  return true;
578
10.1M
}
579
580
0
void LogEntryPB::Swap(LogEntryPB* other) {
581
0
  if (other == this) return;
582
0
  InternalSwap(other);
583
0
}
584
0
void LogEntryPB::InternalSwap(LogEntryPB* other) {
585
0
  using std::swap;
586
0
  swap(replicate_, other->replicate_);
587
0
  swap(type_, other->type_);
588
0
  swap(_has_bits_[0], other->_has_bits_[0]);
589
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
590
0
  swap(_cached_size_, other->_cached_size_);
591
0
}
592
593
2.83k
::google::protobuf::Metadata LogEntryPB::GetMetadata() const {
594
2.83k
  protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce();
595
2.83k
  return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages];
596
2.83k
}
597
598
599
// ===================================================================
600
601
11.2k
void LogEntryBatchPB::InitAsDefaultInstance() {
602
11.2k
  ::yb::log::_LogEntryBatchPB_default_instance_._instance.get_mutable()->committed_op_id_ = const_cast< ::yb::OpIdPB*>(
603
11.2k
      ::yb::OpIdPB::internal_default_instance());
604
11.2k
}
605
0
void LogEntryBatchPB::clear_committed_op_id() {
606
0
  if (committed_op_id_ != NULL) committed_op_id_->Clear();
607
0
  clear_has_committed_op_id();
608
0
}
609
#if !defined(_MSC_VER) || _MSC_VER >= 1900
610
const int LogEntryBatchPB::kEntryFieldNumber;
611
const int LogEntryBatchPB::kCommittedOpIdFieldNumber;
612
const int LogEntryBatchPB::kMonoTimeFieldNumber;
613
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
614
615
LogEntryBatchPB::LogEntryBatchPB()
616
34.4M
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
617
34.4M
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
618
34.4M
    ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogEntryBatchPB();
619
34.4M
  }
620
34.4M
  SharedCtor();
621
  // @@protoc_insertion_point(constructor:yb.log.LogEntryBatchPB)
622
34.4M
}
623
LogEntryBatchPB::LogEntryBatchPB(const LogEntryBatchPB& from)
624
  : ::google::protobuf::Message(),
625
      _internal_metadata_(NULL),
626
      _has_bits_(from._has_bits_),
627
      _cached_size_(0),
628
0
      entry_(from.entry_) {
629
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
630
0
  if (from.has_committed_op_id()) {
631
0
    committed_op_id_ = new ::yb::OpIdPB(*from.committed_op_id_);
632
0
  } else {
633
0
    committed_op_id_ = NULL;
634
0
  }
635
0
  mono_time_ = from.mono_time_;
636
  // @@protoc_insertion_point(copy_constructor:yb.log.LogEntryBatchPB)
637
0
}
638
639
34.4M
void LogEntryBatchPB::SharedCtor() {
640
34.4M
  _cached_size_ = 0;
641
34.4M
  ::memset(&committed_op_id_, 0, static_cast<size_t>(
642
34.4M
      reinterpret_cast<char*>(&mono_time_) -
643
34.4M
      reinterpret_cast<char*>(&committed_op_id_)) + sizeof(mono_time_));
644
34.4M
}
645
646
34.4M
LogEntryBatchPB::~LogEntryBatchPB() {
647
  // @@protoc_insertion_point(destructor:yb.log.LogEntryBatchPB)
648
34.4M
  SharedDtor();
649
34.4M
}
650
651
34.4M
void LogEntryBatchPB::SharedDtor() {
652
34.4M
  if (this != internal_default_instance()) delete committed_op_id_;
653
34.4M
}
654
655
0
void LogEntryBatchPB::SetCachedSize(int size) const {
656
0
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
657
0
  _cached_size_ = size;
658
0
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
659
0
}
660
0
const ::google::protobuf::Descriptor* LogEntryBatchPB::descriptor() {
661
0
  ::protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce();
662
0
  return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
663
0
}
664
665
0
const LogEntryBatchPB& LogEntryBatchPB::default_instance() {
666
0
  ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogEntryBatchPB();
667
0
  return *internal_default_instance();
668
0
}
669
670
0
LogEntryBatchPB* LogEntryBatchPB::New(::google::protobuf::Arena* arena) const {
671
0
  LogEntryBatchPB* n = new LogEntryBatchPB;
672
0
  if (arena != NULL) {
673
0
    arena->Own(n);
674
0
  }
675
0
  return n;
676
0
}
677
678
2.35M
void LogEntryBatchPB::Clear() {
679
// @@protoc_insertion_point(message_clear_start:yb.log.LogEntryBatchPB)
680
2.35M
  ::google::protobuf::uint32 cached_has_bits = 0;
681
  // Prevent compiler warnings about cached_has_bits being unused
682
2.35M
  (void) cached_has_bits;
683
684
2.35M
  entry_.Clear();
685
2.35M
  cached_has_bits = _has_bits_[0];
686
2.35M
  if (cached_has_bits & 0x00000001u) {
687
0
    GOOGLE_DCHECK(committed_op_id_ != NULL);
688
0
    committed_op_id_->Clear();
689
0
  }
690
2.35M
  mono_time_ = GOOGLE_ULONGLONG(0);
691
2.35M
  _has_bits_.Clear();
692
2.35M
  _internal_metadata_.Clear();
693
2.35M
}
694
695
bool LogEntryBatchPB::MergePartialFromCodedStream(
696
2.34M
    ::google::protobuf::io::CodedInputStream* input) {
697
6.16M
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
698
2.34M
  ::google::protobuf::uint32 tag;
699
  // @@protoc_insertion_point(parse_start:yb.log.LogEntryBatchPB)
700
8.49M
  for (;;) {
701
8.49M
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
702
8.49M
    tag = p.first;
703
8.49M
    if (!p.second) goto handle_unusual;
704
6.14M
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
705
      // repeated .yb.log.LogEntryPB entry = 1;
706
1.50M
      case 1: {
707
1.50M
        if (static_cast< ::google::protobuf::uint8>(tag) ==
708
1.50M
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
709
1.50M
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_entry()));
710
18.4E
        } else {
711
18.4E
          goto handle_unusual;
712
18.4E
        }
713
1.50M
        break;
714
1.50M
      }
715
716
      // optional .yb.OpIdPB committed_op_id = 2;
717
2.30M
      case 2: {
718
2.30M
        if (static_cast< ::google::protobuf::uint8>(tag) ==
719
2.30M
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
720
2.30M
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
721
2.30M
               input, mutable_committed_op_id()));
722
18.4E
        } else {
723
18.4E
          goto handle_unusual;
724
18.4E
        }
725
2.30M
        break;
726
2.30M
      }
727
728
      // optional uint64 mono_time = 3;
729
2.35M
      case 3: {
730
2.35M
        if (static_cast< ::google::protobuf::uint8>(tag) ==
731
2.35M
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
732
2.35M
          set_has_mono_time();
733
2.35M
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
734
2.35M
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
735
2.35M
                 input, &mono_time_)));
736
2
        } else {
737
2
          goto handle_unusual;
738
2
        }
739
2.35M
        break;
740
2.35M
      }
741
742
0
      default: {
743
2.35M
      handle_unusual:
744
2.35M
        if (tag == 0) {
745
2.35M
          goto success;
746
2.35M
        }
747
18.4E
        DO_(::google::protobuf::internal::WireFormat::SkipField(
748
18.4E
              input, tag, _internal_metadata_.mutable_unknown_fields()));
749
18.4E
        break;
750
18.4E
      }
751
6.14M
    }
752
6.14M
  }
753
2.35M
success:
754
  // @@protoc_insertion_point(parse_success:yb.log.LogEntryBatchPB)
755
2.35M
  return true;
756
0
failure:
757
  // @@protoc_insertion_point(parse_failure:yb.log.LogEntryBatchPB)
758
0
  return false;
759
2.34M
#undef DO_
760
2.34M
}
761
762
void LogEntryBatchPB::SerializeWithCachedSizes(
763
0
    ::google::protobuf::io::CodedOutputStream* output) const {
764
  // @@protoc_insertion_point(serialize_start:yb.log.LogEntryBatchPB)
765
0
  ::google::protobuf::uint32 cached_has_bits = 0;
766
0
  (void) cached_has_bits;
767
768
  // repeated .yb.log.LogEntryPB entry = 1;
769
0
  for (unsigned int i = 0,
770
0
      n = static_cast<unsigned int>(this->entry_size()); i < n; i++) {
771
0
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
772
0
      1, this->entry(static_cast<int>(i)), output);
773
0
  }
774
775
0
  cached_has_bits = _has_bits_[0];
776
  // optional .yb.OpIdPB committed_op_id = 2;
777
0
  if (cached_has_bits & 0x00000001u) {
778
0
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
779
0
      2, *this->committed_op_id_, output);
780
0
  }
781
782
  // optional uint64 mono_time = 3;
783
0
  if (cached_has_bits & 0x00000002u) {
784
0
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(3, this->mono_time(), output);
785
0
  }
786
787
0
  if (_internal_metadata_.have_unknown_fields()) {
788
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
789
0
        _internal_metadata_.unknown_fields(), output);
790
0
  }
791
  // @@protoc_insertion_point(serialize_end:yb.log.LogEntryBatchPB)
792
0
}
793
794
::google::protobuf::uint8* LogEntryBatchPB::InternalSerializeWithCachedSizesToArray(
795
13.8M
    bool deterministic, ::google::protobuf::uint8* target) const {
796
13.8M
  (void)deterministic; // Unused
797
  // @@protoc_insertion_point(serialize_to_array_start:yb.log.LogEntryBatchPB)
798
13.8M
  ::google::protobuf::uint32 cached_has_bits = 0;
799
13.8M
  (void) cached_has_bits;
800
801
  // repeated .yb.log.LogEntryPB entry = 1;
802
13.8M
  for (unsigned int i = 0,
803
22.5M
      n = static_cast<unsigned int>(this->entry_size()); i < n; i++) {
804
8.67M
    target = ::google::protobuf::internal::WireFormatLite::
805
8.67M
      InternalWriteMessageToArray(
806
8.67M
        1, this->entry(static_cast<int>(i)), deterministic, target);
807
8.67M
  }
808
809
13.8M
  cached_has_bits = _has_bits_[0];
810
  // optional .yb.OpIdPB committed_op_id = 2;
811
13.8M
  if (cached_has_bits & 0x00000001u) {
812
13.6M
    target = ::google::protobuf::internal::WireFormatLite::
813
13.6M
      InternalWriteMessageToArray(
814
13.6M
        2, *this->committed_op_id_, deterministic, target);
815
13.6M
  }
816
817
  // optional uint64 mono_time = 3;
818
13.8M
  if (cached_has_bits & 0x00000002u) {
819
13.8M
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(3, this->mono_time(), target);
820
13.8M
  }
821
822
13.8M
  if (_internal_metadata_.have_unknown_fields()) {
823
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
824
0
        _internal_metadata_.unknown_fields(), target);
825
0
  }
826
  // @@protoc_insertion_point(serialize_to_array_end:yb.log.LogEntryBatchPB)
827
13.8M
  return target;
828
13.8M
}
829
830
27.7M
size_t LogEntryBatchPB::ByteSizeLong() const {
831
// @@protoc_insertion_point(message_byte_size_start:yb.log.LogEntryBatchPB)
832
27.7M
  size_t total_size = 0;
833
834
27.7M
  if (_internal_metadata_.have_unknown_fields()) {
835
0
    total_size +=
836
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
837
0
        _internal_metadata_.unknown_fields());
838
0
  }
839
  // repeated .yb.log.LogEntryPB entry = 1;
840
27.7M
  {
841
27.7M
    unsigned int count = static_cast<unsigned int>(this->entry_size());
842
27.7M
    total_size += 1UL * count;
843
45.1M
    for (unsigned int i = 0; i < count; i++) {
844
17.3M
      total_size +=
845
17.3M
        ::google::protobuf::internal::WireFormatLite::MessageSize(
846
17.3M
          this->entry(static_cast<int>(i)));
847
17.3M
    }
848
27.7M
  }
849
850
27.7M
  if (_has_bits_[0 / 32] & 3u) {
851
    // optional .yb.OpIdPB committed_op_id = 2;
852
27.7M
    if (has_committed_op_id()) {
853
27.3M
      total_size += 1 +
854
27.3M
        ::google::protobuf::internal::WireFormatLite::MessageSize(
855
27.3M
          *this->committed_op_id_);
856
27.3M
    }
857
858
    // optional uint64 mono_time = 3;
859
27.7M
    if (has_mono_time()) {
860
27.7M
      total_size += 1 +
861
27.7M
        ::google::protobuf::internal::WireFormatLite::UInt64Size(
862
27.7M
          this->mono_time());
863
27.7M
    }
864
865
27.7M
  }
866
27.7M
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
867
27.7M
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
868
27.7M
  _cached_size_ = cached_size;
869
27.7M
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
870
27.7M
  return total_size;
871
27.7M
}
872
873
0
void LogEntryBatchPB::MergeFrom(const ::google::protobuf::Message& from) {
874
// @@protoc_insertion_point(generalized_merge_from_start:yb.log.LogEntryBatchPB)
875
0
  GOOGLE_DCHECK_NE(&from, this);
876
0
  const LogEntryBatchPB* source =
877
0
      ::google::protobuf::internal::DynamicCastToGenerated<const LogEntryBatchPB>(
878
0
          &from);
879
0
  if (source == NULL) {
880
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.log.LogEntryBatchPB)
881
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
882
0
  } else {
883
  // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.log.LogEntryBatchPB)
884
0
    MergeFrom(*source);
885
0
  }
886
0
}
887
888
0
void LogEntryBatchPB::MergeFrom(const LogEntryBatchPB& from) {
889
// @@protoc_insertion_point(class_specific_merge_from_start:yb.log.LogEntryBatchPB)
890
0
  GOOGLE_DCHECK_NE(&from, this);
891
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
892
0
  ::google::protobuf::uint32 cached_has_bits = 0;
893
0
  (void) cached_has_bits;
894
895
0
  entry_.MergeFrom(from.entry_);
896
0
  cached_has_bits = from._has_bits_[0];
897
0
  if (cached_has_bits & 3u) {
898
0
    if (cached_has_bits & 0x00000001u) {
899
0
      mutable_committed_op_id()->::yb::OpIdPB::MergeFrom(from.committed_op_id());
900
0
    }
901
0
    if (cached_has_bits & 0x00000002u) {
902
0
      mono_time_ = from.mono_time_;
903
0
    }
904
0
    _has_bits_[0] |= cached_has_bits;
905
0
  }
906
0
}
907
908
0
void LogEntryBatchPB::CopyFrom(const ::google::protobuf::Message& from) {
909
// @@protoc_insertion_point(generalized_copy_from_start:yb.log.LogEntryBatchPB)
910
0
  if (&from == this) return;
911
0
  Clear();
912
0
  MergeFrom(from);
913
0
}
914
915
0
void LogEntryBatchPB::CopyFrom(const LogEntryBatchPB& from) {
916
// @@protoc_insertion_point(class_specific_copy_from_start:yb.log.LogEntryBatchPB)
917
0
  if (&from == this) return;
918
0
  Clear();
919
0
  MergeFrom(from);
920
0
}
921
922
16.2M
bool LogEntryBatchPB::IsInitialized() const {
923
16.2M
  if (!::google::protobuf::internal::AllAreInitialized(this->entry())) return false;
924
16.2M
  if (has_committed_op_id()) {
925
15.9M
    if (!this->committed_op_id_->IsInitialized()) return false;
926
16.2M
  }
927
16.2M
  return true;
928
16.2M
}
929
930
2.35M
void LogEntryBatchPB::Swap(LogEntryBatchPB* other) {
931
2.35M
  if (other == this) return;
932
2.35M
  InternalSwap(other);
933
2.35M
}
934
17.2M
void LogEntryBatchPB::InternalSwap(LogEntryBatchPB* other) {
935
17.2M
  using std::swap;
936
17.2M
  entry_.InternalSwap(&other->entry_);
937
17.2M
  swap(committed_op_id_, other->committed_op_id_);
938
17.2M
  swap(mono_time_, other->mono_time_);
939
17.2M
  swap(_has_bits_[0], other->_has_bits_[0]);
940
17.2M
  _internal_metadata_.Swap(&other->_internal_metadata_);
941
17.2M
  swap(_cached_size_, other->_cached_size_);
942
17.2M
}
943
944
0
::google::protobuf::Metadata LogEntryBatchPB::GetMetadata() const {
945
0
  protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce();
946
0
  return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages];
947
0
}
948
949
950
// ===================================================================
951
952
11.2k
void LogSegmentHeaderPB::InitAsDefaultInstance() {
953
11.2k
  ::yb::log::_LogSegmentHeaderPB_default_instance_._instance.get_mutable()->unused_schema_ = const_cast< ::yb::SchemaPB*>(
954
11.2k
      ::yb::SchemaPB::internal_default_instance());
955
11.2k
}
956
0
void LogSegmentHeaderPB::clear_unused_schema() {
957
0
  if (unused_schema_ != NULL) unused_schema_->Clear();
958
0
  clear_has_unused_schema();
959
0
}
960
#if !defined(_MSC_VER) || _MSC_VER >= 1900
961
const int LogSegmentHeaderPB::kMajorVersionFieldNumber;
962
const int LogSegmentHeaderPB::kMinorVersionFieldNumber;
963
const int LogSegmentHeaderPB::kUnusedTabletIdFieldNumber;
964
const int LogSegmentHeaderPB::kSequenceNumberFieldNumber;
965
const int LogSegmentHeaderPB::kUnusedSchemaFieldNumber;
966
const int LogSegmentHeaderPB::kUnusedSchemaVersionFieldNumber;
967
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
968
969
LogSegmentHeaderPB::LogSegmentHeaderPB()
970
376k
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
971
364k
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
972
364k
    ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogSegmentHeaderPB();
973
364k
  }
974
376k
  SharedCtor();
975
  // @@protoc_insertion_point(constructor:yb.log.LogSegmentHeaderPB)
976
376k
}
977
LogSegmentHeaderPB::LogSegmentHeaderPB(const LogSegmentHeaderPB& from)
978
  : ::google::protobuf::Message(),
979
      _internal_metadata_(NULL),
980
      _has_bits_(from._has_bits_),
981
0
      _cached_size_(0) {
982
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
983
0
  unused_tablet_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
984
0
  if (from.has_unused_tablet_id()) {
985
0
    unused_tablet_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.unused_tablet_id_);
986
0
  }
987
0
  if (from.has_unused_schema()) {
988
0
    unused_schema_ = new ::yb::SchemaPB(*from.unused_schema_);
989
0
  } else {
990
0
    unused_schema_ = NULL;
991
0
  }
992
0
  ::memcpy(&major_version_, &from.major_version_,
993
0
    static_cast<size_t>(reinterpret_cast<char*>(&unused_schema_version_) -
994
0
    reinterpret_cast<char*>(&major_version_)) + sizeof(unused_schema_version_));
995
  // @@protoc_insertion_point(copy_constructor:yb.log.LogSegmentHeaderPB)
996
0
}
997
998
376k
void LogSegmentHeaderPB::SharedCtor() {
999
376k
  _cached_size_ = 0;
1000
376k
  unused_tablet_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1001
376k
  ::memset(&unused_schema_, 0, static_cast<size_t>(
1002
376k
      reinterpret_cast<char*>(&unused_schema_version_) -
1003
376k
      reinterpret_cast<char*>(&unused_schema_)) + sizeof(unused_schema_version_));
1004
376k
}
1005
1006
280k
LogSegmentHeaderPB::~LogSegmentHeaderPB() {
1007
  // @@protoc_insertion_point(destructor:yb.log.LogSegmentHeaderPB)
1008
280k
  SharedDtor();
1009
280k
}
1010
1011
280k
void LogSegmentHeaderPB::SharedDtor() {
1012
280k
  unused_tablet_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
1013
280k
  if (this != internal_default_instance()) delete unused_schema_;
1014
280k
}
1015
1016
0
void LogSegmentHeaderPB::SetCachedSize(int size) const {
1017
0
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1018
0
  _cached_size_ = size;
1019
0
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1020
0
}
1021
0
const ::google::protobuf::Descriptor* LogSegmentHeaderPB::descriptor() {
1022
0
  ::protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce();
1023
0
  return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
1024
0
}
1025
1026
0
const LogSegmentHeaderPB& LogSegmentHeaderPB::default_instance() {
1027
0
  ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogSegmentHeaderPB();
1028
0
  return *internal_default_instance();
1029
0
}
1030
1031
0
LogSegmentHeaderPB* LogSegmentHeaderPB::New(::google::protobuf::Arena* arena) const {
1032
0
  LogSegmentHeaderPB* n = new LogSegmentHeaderPB;
1033
0
  if (arena != NULL) {
1034
0
    arena->Own(n);
1035
0
  }
1036
0
  return n;
1037
0
}
1038
1039
267k
void LogSegmentHeaderPB::Clear() {
1040
// @@protoc_insertion_point(message_clear_start:yb.log.LogSegmentHeaderPB)
1041
267k
  ::google::protobuf::uint32 cached_has_bits = 0;
1042
  // Prevent compiler warnings about cached_has_bits being unused
1043
267k
  (void) cached_has_bits;
1044
1045
267k
  cached_has_bits = _has_bits_[0];
1046
267k
  if (cached_has_bits & 3u) {
1047
0
    if (cached_has_bits & 0x00000001u) {
1048
0
      GOOGLE_DCHECK(!unused_tablet_id_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
1049
0
      (*unused_tablet_id_.UnsafeRawStringPointer())->clear();
1050
0
    }
1051
0
    if (cached_has_bits & 0x00000002u) {
1052
0
      GOOGLE_DCHECK(unused_schema_ != NULL);
1053
0
      unused_schema_->Clear();
1054
0
    }
1055
0
  }
1056
267k
  if (cached_has_bits & 60u) {
1057
0
    ::memset(&major_version_, 0, static_cast<size_t>(
1058
0
        reinterpret_cast<char*>(&unused_schema_version_) -
1059
0
        reinterpret_cast<char*>(&major_version_)) + sizeof(unused_schema_version_));
1060
0
  }
1061
267k
  _has_bits_.Clear();
1062
267k
  _internal_metadata_.Clear();
1063
267k
}
1064
1065
bool LogSegmentHeaderPB::MergePartialFromCodedStream(
1066
9.19k
    ::google::protobuf::io::CodedInputStream* input) {
1067
55.1k
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
1068
9.19k
  ::google::protobuf::uint32 tag;
1069
  // @@protoc_insertion_point(parse_start:yb.log.LogSegmentHeaderPB)
1070
64.2k
  for (;;) {
1071
64.2k
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1072
64.2k
    tag = p.first;
1073
64.2k
    if (!p.second) goto handle_unusual;
1074
55.0k
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1075
      // required uint32 major_version = 1;
1076
9.17k
      case 1: {
1077
9.17k
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1078
9.18k
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
1079
9.18k
          set_has_major_version();
1080
9.18k
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1081
9.18k
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
1082
9.18k
                 input, &major_version_)));
1083
18.4E
        } else {
1084
18.4E
          goto handle_unusual;
1085
18.4E
        }
1086
9.18k
        break;
1087
9.18k
      }
1088
1089
      // required uint32 minor_version = 2;
1090
9.17k
      case 2: {
1091
9.17k
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1092
9.19k
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
1093
9.19k
          set_has_minor_version();
1094
9.19k
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1095
9.19k
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
1096
9.19k
                 input, &minor_version_)));
1097
18.4E
        } else {
1098
18.4E
          goto handle_unusual;
1099
18.4E
        }
1100
9.19k
        break;
1101
9.19k
      }
1102
1103
      // required bytes unused_tablet_id = 5;
1104
9.19k
      case 5: {
1105
9.19k
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1106
9.19k
            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
1107
9.19k
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
1108
9.19k
                input, this->mutable_unused_tablet_id()));
1109
1
        } else {
1110
1
          goto handle_unusual;
1111
1
        }
1112
9.19k
        break;
1113
9.19k
      }
1114
1115
      // required uint64 sequence_number = 6;
1116
9.19k
      case 6: {
1117
9.19k
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1118
9.19k
            static_cast< ::google::protobuf::uint8>(48u /* 48 & 0xFF */)) {
1119
9.19k
          set_has_sequence_number();
1120
9.19k
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1121
9.19k
                   ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
1122
9.19k
                 input, &sequence_number_)));
1123
1
        } else {
1124
1
          goto handle_unusual;
1125
1
        }
1126
9.19k
        break;
1127
9.19k
      }
1128
1129
      // required .yb.SchemaPB unused_schema = 7;
1130
9.18k
      case 7: {
1131
9.18k
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1132
9.18k
            static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
1133
9.18k
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
1134
9.18k
               input, mutable_unused_schema()));
1135
18.4E
        } else {
1136
18.4E
          goto handle_unusual;
1137
18.4E
        }
1138
9.18k
        break;
1139
9.18k
      }
1140
1141
      // optional uint32 unused_schema_version = 8;
1142
9.17k
      case 8: {
1143
9.17k
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1144
9.18k
            static_cast< ::google::protobuf::uint8>(64u /* 64 & 0xFF */)) {
1145
9.18k
          set_has_unused_schema_version();
1146
9.18k
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1147
9.18k
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
1148
9.18k
                 input, &unused_schema_version_)));
1149
18.4E
        } else {
1150
18.4E
          goto handle_unusual;
1151
18.4E
        }
1152
9.18k
        break;
1153
9.18k
      }
1154
1155
0
      default: {
1156
9.18k
      handle_unusual:
1157
9.18k
        if (tag == 0) {
1158
9.18k
          goto success;
1159
9.18k
        }
1160
18.4E
        DO_(::google::protobuf::internal::WireFormat::SkipField(
1161
18.4E
              input, tag, _internal_metadata_.mutable_unknown_fields()));
1162
18.4E
        break;
1163
18.4E
      }
1164
55.0k
    }
1165
55.0k
  }
1166
9.18k
success:
1167
  // @@protoc_insertion_point(parse_success:yb.log.LogSegmentHeaderPB)
1168
9.18k
  return true;
1169
0
failure:
1170
  // @@protoc_insertion_point(parse_failure:yb.log.LogSegmentHeaderPB)
1171
0
  return false;
1172
9.19k
#undef DO_
1173
9.19k
}
1174
1175
void LogSegmentHeaderPB::SerializeWithCachedSizes(
1176
0
    ::google::protobuf::io::CodedOutputStream* output) const {
1177
  // @@protoc_insertion_point(serialize_start:yb.log.LogSegmentHeaderPB)
1178
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1179
0
  (void) cached_has_bits;
1180
1181
0
  cached_has_bits = _has_bits_[0];
1182
  // required uint32 major_version = 1;
1183
0
  if (cached_has_bits & 0x00000004u) {
1184
0
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->major_version(), output);
1185
0
  }
1186
1187
  // required uint32 minor_version = 2;
1188
0
  if (cached_has_bits & 0x00000008u) {
1189
0
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->minor_version(), output);
1190
0
  }
1191
1192
  // required bytes unused_tablet_id = 5;
1193
0
  if (cached_has_bits & 0x00000001u) {
1194
0
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
1195
0
      5, this->unused_tablet_id(), output);
1196
0
  }
1197
1198
  // required uint64 sequence_number = 6;
1199
0
  if (cached_has_bits & 0x00000010u) {
1200
0
    ::google::protobuf::internal::WireFormatLite::WriteUInt64(6, this->sequence_number(), output);
1201
0
  }
1202
1203
  // required .yb.SchemaPB unused_schema = 7;
1204
0
  if (cached_has_bits & 0x00000002u) {
1205
0
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1206
0
      7, *this->unused_schema_, output);
1207
0
  }
1208
1209
  // optional uint32 unused_schema_version = 8;
1210
0
  if (cached_has_bits & 0x00000020u) {
1211
0
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(8, this->unused_schema_version(), output);
1212
0
  }
1213
1214
0
  if (_internal_metadata_.have_unknown_fields()) {
1215
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1216
0
        _internal_metadata_.unknown_fields(), output);
1217
0
  }
1218
  // @@protoc_insertion_point(serialize_end:yb.log.LogSegmentHeaderPB)
1219
0
}
1220
1221
::google::protobuf::uint8* LogSegmentHeaderPB::InternalSerializeWithCachedSizesToArray(
1222
96.9k
    bool deterministic, ::google::protobuf::uint8* target) const {
1223
96.9k
  (void)deterministic; // Unused
1224
  // @@protoc_insertion_point(serialize_to_array_start:yb.log.LogSegmentHeaderPB)
1225
96.9k
  ::google::protobuf::uint32 cached_has_bits = 0;
1226
96.9k
  (void) cached_has_bits;
1227
1228
96.9k
  cached_has_bits = _has_bits_[0];
1229
  // required uint32 major_version = 1;
1230
96.9k
  if (cached_has_bits & 0x00000004u) {
1231
96.9k
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->major_version(), target);
1232
96.9k
  }
1233
1234
  // required uint32 minor_version = 2;
1235
96.9k
  if (cached_has_bits & 0x00000008u) {
1236
96.9k
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->minor_version(), target);
1237
96.9k
  }
1238
1239
  // required bytes unused_tablet_id = 5;
1240
96.9k
  if (cached_has_bits & 0x00000001u) {
1241
96.9k
    target =
1242
96.9k
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
1243
96.9k
        5, this->unused_tablet_id(), target);
1244
96.9k
  }
1245
1246
  // required uint64 sequence_number = 6;
1247
97.0k
  if (cached_has_bits & 0x00000010u) {
1248
97.0k
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(6, this->sequence_number(), target);
1249
97.0k
  }
1250
1251
  // required .yb.SchemaPB unused_schema = 7;
1252
96.9k
  if (cached_has_bits & 0x00000002u) {
1253
96.9k
    target = ::google::protobuf::internal::WireFormatLite::
1254
96.9k
      InternalWriteMessageToArray(
1255
96.9k
        7, *this->unused_schema_, deterministic, target);
1256
96.9k
  }
1257
1258
  // optional uint32 unused_schema_version = 8;
1259
97.0k
  if (cached_has_bits & 0x00000020u) {
1260
97.0k
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(8, this->unused_schema_version(), target);
1261
97.0k
  }
1262
1263
96.9k
  if (_internal_metadata_.have_unknown_fields()) {
1264
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1265
0
        _internal_metadata_.unknown_fields(), target);
1266
0
  }
1267
  // @@protoc_insertion_point(serialize_to_array_end:yb.log.LogSegmentHeaderPB)
1268
96.9k
  return target;
1269
96.9k
}
1270
1271
0
size_t LogSegmentHeaderPB::RequiredFieldsByteSizeFallback() const {
1272
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:yb.log.LogSegmentHeaderPB)
1273
0
  size_t total_size = 0;
1274
1275
0
  if (has_unused_tablet_id()) {
1276
    // required bytes unused_tablet_id = 5;
1277
0
    total_size += 1 +
1278
0
      ::google::protobuf::internal::WireFormatLite::BytesSize(
1279
0
        this->unused_tablet_id());
1280
0
  }
1281
1282
0
  if (has_unused_schema()) {
1283
    // required .yb.SchemaPB unused_schema = 7;
1284
0
    total_size += 1 +
1285
0
      ::google::protobuf::internal::WireFormatLite::MessageSize(
1286
0
        *this->unused_schema_);
1287
0
  }
1288
1289
0
  if (has_major_version()) {
1290
    // required uint32 major_version = 1;
1291
0
    total_size += 1 +
1292
0
      ::google::protobuf::internal::WireFormatLite::UInt32Size(
1293
0
        this->major_version());
1294
0
  }
1295
1296
0
  if (has_minor_version()) {
1297
    // required uint32 minor_version = 2;
1298
0
    total_size += 1 +
1299
0
      ::google::protobuf::internal::WireFormatLite::UInt32Size(
1300
0
        this->minor_version());
1301
0
  }
1302
1303
0
  if (has_sequence_number()) {
1304
    // required uint64 sequence_number = 6;
1305
0
    total_size += 1 +
1306
0
      ::google::protobuf::internal::WireFormatLite::UInt64Size(
1307
0
        this->sequence_number());
1308
0
  }
1309
1310
0
  return total_size;
1311
0
}
1312
194k
size_t LogSegmentHeaderPB::ByteSizeLong() const {
1313
// @@protoc_insertion_point(message_byte_size_start:yb.log.LogSegmentHeaderPB)
1314
194k
  size_t total_size = 0;
1315
1316
194k
  if (_internal_metadata_.have_unknown_fields()) {
1317
0
    total_size +=
1318
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1319
0
        _internal_metadata_.unknown_fields());
1320
0
  }
1321
194k
  if (((_has_bits_[0] & 0x0000001f) ^ 0x0000001f) == 0) {  // All required fields are present.
1322
    // required bytes unused_tablet_id = 5;
1323
194k
    total_size += 1 +
1324
194k
      ::google::protobuf::internal::WireFormatLite::BytesSize(
1325
194k
        this->unused_tablet_id());
1326
1327
    // required .yb.SchemaPB unused_schema = 7;
1328
194k
    total_size += 1 +
1329
194k
      ::google::protobuf::internal::WireFormatLite::MessageSize(
1330
194k
        *this->unused_schema_);
1331
1332
    // required uint32 major_version = 1;
1333
194k
    total_size += 1 +
1334
194k
      ::google::protobuf::internal::WireFormatLite::UInt32Size(
1335
194k
        this->major_version());
1336
1337
    // required uint32 minor_version = 2;
1338
194k
    total_size += 1 +
1339
194k
      ::google::protobuf::internal::WireFormatLite::UInt32Size(
1340
194k
        this->minor_version());
1341
1342
    // required uint64 sequence_number = 6;
1343
194k
    total_size += 1 +
1344
194k
      ::google::protobuf::internal::WireFormatLite::UInt64Size(
1345
194k
        this->sequence_number());
1346
1347
18.4E
  } else {
1348
18.4E
    total_size += RequiredFieldsByteSizeFallback();
1349
18.4E
  }
1350
  // optional uint32 unused_schema_version = 8;
1351
194k
  if (has_unused_schema_version()) {
1352
193k
    total_size += 1 +
1353
193k
      ::google::protobuf::internal::WireFormatLite::UInt32Size(
1354
193k
        this->unused_schema_version());
1355
193k
  }
1356
1357
194k
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1358
194k
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1359
194k
  _cached_size_ = cached_size;
1360
194k
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1361
194k
  return total_size;
1362
194k
}
1363
1364
0
void LogSegmentHeaderPB::MergeFrom(const ::google::protobuf::Message& from) {
1365
// @@protoc_insertion_point(generalized_merge_from_start:yb.log.LogSegmentHeaderPB)
1366
0
  GOOGLE_DCHECK_NE(&from, this);
1367
0
  const LogSegmentHeaderPB* source =
1368
0
      ::google::protobuf::internal::DynamicCastToGenerated<const LogSegmentHeaderPB>(
1369
0
          &from);
1370
0
  if (source == NULL) {
1371
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.log.LogSegmentHeaderPB)
1372
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1373
0
  } else {
1374
  // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.log.LogSegmentHeaderPB)
1375
0
    MergeFrom(*source);
1376
0
  }
1377
0
}
1378
1379
258k
void LogSegmentHeaderPB::MergeFrom(const LogSegmentHeaderPB& from) {
1380
// @@protoc_insertion_point(class_specific_merge_from_start:yb.log.LogSegmentHeaderPB)
1381
258k
  GOOGLE_DCHECK_NE(&from, this);
1382
258k
  _internal_metadata_.MergeFrom(from._internal_metadata_);
1383
258k
  ::google::protobuf::uint32 cached_has_bits = 0;
1384
258k
  (void) cached_has_bits;
1385
1386
258k
  cached_has_bits = from._has_bits_[0];
1387
258k
  if (cached_has_bits & 63u) {
1388
258k
    if (cached_has_bits & 0x00000001u) {
1389
258k
      set_has_unused_tablet_id();
1390
258k
      unused_tablet_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.unused_tablet_id_);
1391
258k
    }
1392
257k
    if (cached_has_bits & 0x00000002u) {
1393
257k
      mutable_unused_schema()->::yb::SchemaPB::MergeFrom(from.unused_schema());
1394
257k
    }
1395
258k
    if (cached_has_bits & 0x00000004u) {
1396
258k
      major_version_ = from.major_version_;
1397
258k
    }
1398
258k
    if (cached_has_bits & 0x00000008u) {
1399
258k
      minor_version_ = from.minor_version_;
1400
258k
    }
1401
258k
    if (cached_has_bits & 0x00000010u) {
1402
258k
      sequence_number_ = from.sequence_number_;
1403
258k
    }
1404
258k
    if (cached_has_bits & 0x00000020u) {
1405
258k
      unused_schema_version_ = from.unused_schema_version_;
1406
258k
    }
1407
257k
    _has_bits_[0] |= cached_has_bits;
1408
257k
  }
1409
258k
}
1410
1411
0
void LogSegmentHeaderPB::CopyFrom(const ::google::protobuf::Message& from) {
1412
// @@protoc_insertion_point(generalized_copy_from_start:yb.log.LogSegmentHeaderPB)
1413
0
  if (&from == this) return;
1414
0
  Clear();
1415
0
  MergeFrom(from);
1416
0
}
1417
1418
258k
void LogSegmentHeaderPB::CopyFrom(const LogSegmentHeaderPB& from) {
1419
// @@protoc_insertion_point(class_specific_copy_from_start:yb.log.LogSegmentHeaderPB)
1420
258k
  if (&from == this) return;
1421
258k
  Clear();
1422
258k
  MergeFrom(from);
1423
258k
}
1424
1425
14.6M
bool LogSegmentHeaderPB::IsInitialized() const {
1426
14.6M
  if ((_has_bits_[0] & 0x0000001f) != 0x0000001f) return false;
1427
14.6M
  if (has_unused_schema()) {
1428
14.6M
    if (!this->unused_schema_->IsInitialized()) return false;
1429
14.6M
  }
1430
14.6M
  return true;
1431
14.6M
}
1432
1433
0
void LogSegmentHeaderPB::Swap(LogSegmentHeaderPB* other) {
1434
0
  if (other == this) return;
1435
0
  InternalSwap(other);
1436
0
}
1437
0
void LogSegmentHeaderPB::InternalSwap(LogSegmentHeaderPB* other) {
1438
0
  using std::swap;
1439
0
  unused_tablet_id_.Swap(&other->unused_tablet_id_);
1440
0
  swap(unused_schema_, other->unused_schema_);
1441
0
  swap(major_version_, other->major_version_);
1442
0
  swap(minor_version_, other->minor_version_);
1443
0
  swap(sequence_number_, other->sequence_number_);
1444
0
  swap(unused_schema_version_, other->unused_schema_version_);
1445
0
  swap(_has_bits_[0], other->_has_bits_[0]);
1446
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
1447
0
  swap(_cached_size_, other->_cached_size_);
1448
0
}
1449
1450
0
::google::protobuf::Metadata LogSegmentHeaderPB::GetMetadata() const {
1451
0
  protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce();
1452
0
  return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages];
1453
0
}
1454
1455
1456
// ===================================================================
1457
1458
11.2k
void LogSegmentFooterPB::InitAsDefaultInstance() {
1459
11.2k
}
1460
#if !defined(_MSC_VER) || _MSC_VER >= 1900
1461
const int LogSegmentFooterPB::kNumEntriesFieldNumber;
1462
const int LogSegmentFooterPB::kMinReplicateIndexFieldNumber;
1463
const int LogSegmentFooterPB::kMaxReplicateIndexFieldNumber;
1464
const int LogSegmentFooterPB::kCloseTimestampMicrosFieldNumber;
1465
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
1466
1467
LogSegmentFooterPB::LogSegmentFooterPB()
1468
366k
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
1469
354k
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
1470
354k
    ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogSegmentFooterPB();
1471
354k
  }
1472
366k
  SharedCtor();
1473
  // @@protoc_insertion_point(constructor:yb.log.LogSegmentFooterPB)
1474
366k
}
1475
LogSegmentFooterPB::LogSegmentFooterPB(const LogSegmentFooterPB& from)
1476
  : ::google::protobuf::Message(),
1477
      _internal_metadata_(NULL),
1478
      _has_bits_(from._has_bits_),
1479
0
      _cached_size_(0) {
1480
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
1481
0
  ::memcpy(&num_entries_, &from.num_entries_,
1482
0
    static_cast<size_t>(reinterpret_cast<char*>(&max_replicate_index_) -
1483
0
    reinterpret_cast<char*>(&num_entries_)) + sizeof(max_replicate_index_));
1484
  // @@protoc_insertion_point(copy_constructor:yb.log.LogSegmentFooterPB)
1485
0
}
1486
1487
365k
void LogSegmentFooterPB::SharedCtor() {
1488
365k
  _cached_size_ = 0;
1489
365k
  ::memset(&num_entries_, 0, static_cast<size_t>(
1490
365k
      reinterpret_cast<char*>(&close_timestamp_micros_) -
1491
365k
      reinterpret_cast<char*>(&num_entries_)) + sizeof(close_timestamp_micros_));
1492
365k
  min_replicate_index_ = GOOGLE_LONGLONG(-1);
1493
365k
  max_replicate_index_ = GOOGLE_LONGLONG(-1);
1494
365k
}
1495
1496
228k
LogSegmentFooterPB::~LogSegmentFooterPB() {
1497
  // @@protoc_insertion_point(destructor:yb.log.LogSegmentFooterPB)
1498
228k
  SharedDtor();
1499
228k
}
1500
1501
228k
void LogSegmentFooterPB::SharedDtor() {
1502
228k
}
1503
1504
0
void LogSegmentFooterPB::SetCachedSize(int size) const {
1505
0
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1506
0
  _cached_size_ = size;
1507
0
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1508
0
}
1509
0
const ::google::protobuf::Descriptor* LogSegmentFooterPB::descriptor() {
1510
0
  ::protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce();
1511
0
  return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
1512
0
}
1513
1514
0
const LogSegmentFooterPB& LogSegmentFooterPB::default_instance() {
1515
0
  ::protobuf_yb_2fconsensus_2flog_2eproto::InitDefaultsLogSegmentFooterPB();
1516
0
  return *internal_default_instance();
1517
0
}
1518
1519
0
LogSegmentFooterPB* LogSegmentFooterPB::New(::google::protobuf::Arena* arena) const {
1520
0
  LogSegmentFooterPB* n = new LogSegmentFooterPB;
1521
0
  if (arena != NULL) {
1522
0
    arena->Own(n);
1523
0
  }
1524
0
  return n;
1525
0
}
1526
1527
215k
void LogSegmentFooterPB::Clear() {
1528
// @@protoc_insertion_point(message_clear_start:yb.log.LogSegmentFooterPB)
1529
215k
  ::google::protobuf::uint32 cached_has_bits = 0;
1530
  // Prevent compiler warnings about cached_has_bits being unused
1531
215k
  (void) cached_has_bits;
1532
1533
215k
  cached_has_bits = _has_bits_[0];
1534
215k
  if (cached_has_bits & 15u) {
1535
9.12k
    ::memset(&num_entries_, 0, static_cast<size_t>(
1536
9.12k
        reinterpret_cast<char*>(&close_timestamp_micros_) -
1537
9.12k
        reinterpret_cast<char*>(&num_entries_)) + sizeof(close_timestamp_micros_));
1538
9.12k
    min_replicate_index_ = GOOGLE_LONGLONG(-1);
1539
9.12k
    max_replicate_index_ = GOOGLE_LONGLONG(-1);
1540
9.12k
  }
1541
215k
  _has_bits_.Clear();
1542
215k
  _internal_metadata_.Clear();
1543
215k
}
1544
1545
bool LogSegmentFooterPB::MergePartialFromCodedStream(
1546
6.86k
    ::google::protobuf::io::CodedInputStream* input) {
1547
27.3k
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
1548
6.86k
  ::google::protobuf::uint32 tag;
1549
  // @@protoc_insertion_point(parse_start:yb.log.LogSegmentFooterPB)
1550
34.2k
  for (;;) {
1551
34.2k
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
1552
34.2k
    tag = p.first;
1553
34.2k
    if (!p.second) goto handle_unusual;
1554
27.3k
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
1555
      // required int64 num_entries = 1;
1556
6.86k
      case 1: {
1557
6.86k
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1558
6.86k
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
1559
6.86k
          set_has_num_entries();
1560
6.86k
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1561
6.86k
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
1562
6.86k
                 input, &num_entries_)));
1563
0
        } else {
1564
0
          goto handle_unusual;
1565
0
        }
1566
6.86k
        break;
1567
6.86k
      }
1568
1569
      // optional int64 min_replicate_index = 2 [default = -1];
1570
6.83k
      case 2: {
1571
6.83k
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1572
6.83k
            static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
1573
6.83k
          set_has_min_replicate_index();
1574
6.83k
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1575
6.83k
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
1576
6.83k
                 input, &min_replicate_index_)));
1577
0
        } else {
1578
0
          goto handle_unusual;
1579
0
        }
1580
6.83k
        break;
1581
6.83k
      }
1582
1583
      // optional int64 max_replicate_index = 3 [default = -1];
1584
6.83k
      case 3: {
1585
6.83k
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1586
6.83k
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
1587
6.83k
          set_has_max_replicate_index();
1588
6.83k
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1589
6.83k
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
1590
6.83k
                 input, &max_replicate_index_)));
1591
18.4E
        } else {
1592
18.4E
          goto handle_unusual;
1593
18.4E
        }
1594
6.83k
        break;
1595
6.83k
      }
1596
1597
      // optional int64 close_timestamp_micros = 4;
1598
6.86k
      case 4: {
1599
6.86k
        if (static_cast< ::google::protobuf::uint8>(tag) ==
1600
6.86k
            static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
1601
6.86k
          set_has_close_timestamp_micros();
1602
6.86k
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
1603
6.86k
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
1604
6.86k
                 input, &close_timestamp_micros_)));
1605
0
        } else {
1606
0
          goto handle_unusual;
1607
0
        }
1608
6.86k
        break;
1609
6.86k
      }
1610
1611
0
      default: {
1612
6.86k
      handle_unusual:
1613
6.86k
        if (tag == 0) {
1614
6.86k
          goto success;
1615
6.86k
        }
1616
0
        DO_(::google::protobuf::internal::WireFormat::SkipField(
1617
0
              input, tag, _internal_metadata_.mutable_unknown_fields()));
1618
0
        break;
1619
0
      }
1620
27.3k
    }
1621
27.3k
  }
1622
6.86k
success:
1623
  // @@protoc_insertion_point(parse_success:yb.log.LogSegmentFooterPB)
1624
6.86k
  return true;
1625
0
failure:
1626
  // @@protoc_insertion_point(parse_failure:yb.log.LogSegmentFooterPB)
1627
0
  return false;
1628
6.86k
#undef DO_
1629
6.86k
}
1630
1631
void LogSegmentFooterPB::SerializeWithCachedSizes(
1632
0
    ::google::protobuf::io::CodedOutputStream* output) const {
1633
  // @@protoc_insertion_point(serialize_start:yb.log.LogSegmentFooterPB)
1634
0
  ::google::protobuf::uint32 cached_has_bits = 0;
1635
0
  (void) cached_has_bits;
1636
1637
0
  cached_has_bits = _has_bits_[0];
1638
  // required int64 num_entries = 1;
1639
0
  if (cached_has_bits & 0x00000001u) {
1640
0
    ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->num_entries(), output);
1641
0
  }
1642
1643
  // optional int64 min_replicate_index = 2 [default = -1];
1644
0
  if (cached_has_bits & 0x00000004u) {
1645
0
    ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->min_replicate_index(), output);
1646
0
  }
1647
1648
  // optional int64 max_replicate_index = 3 [default = -1];
1649
0
  if (cached_has_bits & 0x00000008u) {
1650
0
    ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->max_replicate_index(), output);
1651
0
  }
1652
1653
  // optional int64 close_timestamp_micros = 4;
1654
0
  if (cached_has_bits & 0x00000002u) {
1655
0
    ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->close_timestamp_micros(), output);
1656
0
  }
1657
1658
0
  if (_internal_metadata_.have_unknown_fields()) {
1659
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
1660
0
        _internal_metadata_.unknown_fields(), output);
1661
0
  }
1662
  // @@protoc_insertion_point(serialize_end:yb.log.LogSegmentFooterPB)
1663
0
}
1664
1665
::google::protobuf::uint8* LogSegmentFooterPB::InternalSerializeWithCachedSizesToArray(
1666
56.0k
    bool deterministic, ::google::protobuf::uint8* target) const {
1667
56.0k
  (void)deterministic; // Unused
1668
  // @@protoc_insertion_point(serialize_to_array_start:yb.log.LogSegmentFooterPB)
1669
56.0k
  ::google::protobuf::uint32 cached_has_bits = 0;
1670
56.0k
  (void) cached_has_bits;
1671
1672
56.0k
  cached_has_bits = _has_bits_[0];
1673
  // required int64 num_entries = 1;
1674
56.0k
  if (cached_has_bits & 0x00000001u) {
1675
56.0k
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->num_entries(), target);
1676
56.0k
  }
1677
1678
  // optional int64 min_replicate_index = 2 [default = -1];
1679
56.0k
  if (cached_has_bits & 0x00000004u) {
1680
55.3k
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(2, this->min_replicate_index(), target);
1681
55.3k
  }
1682
1683
  // optional int64 max_replicate_index = 3 [default = -1];
1684
56.0k
  if (cached_has_bits & 0x00000008u) {
1685
55.3k
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->max_replicate_index(), target);
1686
55.3k
  }
1687
1688
  // optional int64 close_timestamp_micros = 4;
1689
56.0k
  if (cached_has_bits & 0x00000002u) {
1690
56.0k
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(4, this->close_timestamp_micros(), target);
1691
56.0k
  }
1692
1693
56.0k
  if (_internal_metadata_.have_unknown_fields()) {
1694
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
1695
0
        _internal_metadata_.unknown_fields(), target);
1696
0
  }
1697
  // @@protoc_insertion_point(serialize_to_array_end:yb.log.LogSegmentFooterPB)
1698
56.0k
  return target;
1699
56.0k
}
1700
1701
120k
size_t LogSegmentFooterPB::ByteSizeLong() const {
1702
// @@protoc_insertion_point(message_byte_size_start:yb.log.LogSegmentFooterPB)
1703
120k
  size_t total_size = 0;
1704
1705
120k
  if (_internal_metadata_.have_unknown_fields()) {
1706
0
    total_size +=
1707
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
1708
0
        _internal_metadata_.unknown_fields());
1709
0
  }
1710
  // required int64 num_entries = 1;
1711
120k
  if (has_num_entries()) {
1712
120k
    total_size += 1 +
1713
120k
      ::google::protobuf::internal::WireFormatLite::Int64Size(
1714
120k
        this->num_entries());
1715
120k
  }
1716
120k
  if (_has_bits_[0 / 32] & 14u) {
1717
    // optional int64 close_timestamp_micros = 4;
1718
120k
    if (has_close_timestamp_micros()) {
1719
120k
      total_size += 1 +
1720
120k
        ::google::protobuf::internal::WireFormatLite::Int64Size(
1721
120k
          this->close_timestamp_micros());
1722
120k
    }
1723
1724
    // optional int64 min_replicate_index = 2 [default = -1];
1725
120k
    if (has_min_replicate_index()) {
1726
118k
      total_size += 1 +
1727
118k
        ::google::protobuf::internal::WireFormatLite::Int64Size(
1728
118k
          this->min_replicate_index());
1729
118k
    }
1730
1731
    // optional int64 max_replicate_index = 3 [default = -1];
1732
120k
    if (has_max_replicate_index()) {
1733
118k
      total_size += 1 +
1734
118k
        ::google::protobuf::internal::WireFormatLite::Int64Size(
1735
118k
          this->max_replicate_index());
1736
118k
    }
1737
1738
120k
  }
1739
120k
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
1740
120k
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
1741
120k
  _cached_size_ = cached_size;
1742
120k
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
1743
120k
  return total_size;
1744
120k
}
1745
1746
0
void LogSegmentFooterPB::MergeFrom(const ::google::protobuf::Message& from) {
1747
// @@protoc_insertion_point(generalized_merge_from_start:yb.log.LogSegmentFooterPB)
1748
0
  GOOGLE_DCHECK_NE(&from, this);
1749
0
  const LogSegmentFooterPB* source =
1750
0
      ::google::protobuf::internal::DynamicCastToGenerated<const LogSegmentFooterPB>(
1751
0
          &from);
1752
0
  if (source == NULL) {
1753
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:yb.log.LogSegmentFooterPB)
1754
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
1755
0
  } else {
1756
  // @@protoc_insertion_point(generalized_merge_from_cast_success:yb.log.LogSegmentFooterPB)
1757
0
    MergeFrom(*source);
1758
0
  }
1759
0
}
1760
1761
111k
void LogSegmentFooterPB::MergeFrom(const LogSegmentFooterPB& from) {
1762
// @@protoc_insertion_point(class_specific_merge_from_start:yb.log.LogSegmentFooterPB)
1763
111k
  GOOGLE_DCHECK_NE(&from, this);
1764
111k
  _internal_metadata_.MergeFrom(from._internal_metadata_);
1765
111k
  ::google::protobuf::uint32 cached_has_bits = 0;
1766
111k
  (void) cached_has_bits;
1767
1768
111k
  cached_has_bits = from._has_bits_[0];
1769
111k
  if (cached_has_bits & 15u) {
1770
111k
    if (cached_has_bits & 0x00000001u) {
1771
111k
      num_entries_ = from.num_entries_;
1772
111k
    }
1773
111k
    if (cached_has_bits & 0x00000002u) {
1774
111k
      close_timestamp_micros_ = from.close_timestamp_micros_;
1775
111k
    }
1776
110k
    if (cached_has_bits & 0x00000004u) {
1777
110k
      min_replicate_index_ = from.min_replicate_index_;
1778
110k
    }
1779
110k
    if (cached_has_bits & 0x00000008u) {
1780
110k
      max_replicate_index_ = from.max_replicate_index_;
1781
110k
    }
1782
110k
    _has_bits_[0] |= cached_has_bits;
1783
110k
  }
1784
111k
}
1785
1786
0
void LogSegmentFooterPB::CopyFrom(const ::google::protobuf::Message& from) {
1787
// @@protoc_insertion_point(generalized_copy_from_start:yb.log.LogSegmentFooterPB)
1788
0
  if (&from == this) return;
1789
0
  Clear();
1790
0
  MergeFrom(from);
1791
0
}
1792
1793
111k
void LogSegmentFooterPB::CopyFrom(const LogSegmentFooterPB& from) {
1794
// @@protoc_insertion_point(class_specific_copy_from_start:yb.log.LogSegmentFooterPB)
1795
111k
  if (&from == this) return;
1796
111k
  Clear();
1797
111k
  MergeFrom(from);
1798
111k
}
1799
1800
21.9M
bool LogSegmentFooterPB::IsInitialized() const {
1801
21.9M
  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
1802
1.61M
  return true;
1803
1.61M
}
1804
1805
6.86k
void LogSegmentFooterPB::Swap(LogSegmentFooterPB* other) {
1806
6.86k
  if (other == this) return;
1807
6.86k
  InternalSwap(other);
1808
6.86k
}
1809
6.86k
void LogSegmentFooterPB::InternalSwap(LogSegmentFooterPB* other) {
1810
6.86k
  using std::swap;
1811
6.86k
  swap(num_entries_, other->num_entries_);
1812
6.86k
  swap(close_timestamp_micros_, other->close_timestamp_micros_);
1813
6.86k
  swap(min_replicate_index_, other->min_replicate_index_);
1814
6.86k
  swap(max_replicate_index_, other->max_replicate_index_);
1815
6.86k
  swap(_has_bits_[0], other->_has_bits_[0]);
1816
6.86k
  _internal_metadata_.Swap(&other->_internal_metadata_);
1817
6.86k
  swap(_cached_size_, other->_cached_size_);
1818
6.86k
}
1819
1820
0
::google::protobuf::Metadata LogSegmentFooterPB::GetMetadata() const {
1821
0
  protobuf_yb_2fconsensus_2flog_2eproto::protobuf_AssignDescriptorsOnce();
1822
0
  return ::protobuf_yb_2fconsensus_2flog_2eproto::file_level_metadata[kIndexInFileMessages];
1823
0
}
1824
1825
1826
// @@protoc_insertion_point(namespace_scope)
1827
}  // namespace log
1828
}  // namespace yb
1829
1830
// @@protoc_insertion_point(global_scope)