MySQL 8.4.2
Source Code Documentation
recovery_metadata_message.h
Go to the documentation of this file.
1/* Copyright (c) 2023, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef RECOVERY_METADATA_MESSAGE_INCLUDED
25#define RECOVERY_METADATA_MESSAGE_INCLUDED
26
27#include <map>
28#include <string>
29#include <vector>
30
31#include "my_inttypes.h"
35
37 public:
38 /**
39 Recovery Metadata message payload type
40 */
42 // This type should not be used anywhere.
44 // Length of the payload item: variable
46 // Length of the payload item: variable
48 // Length of the payload item: variable
50 // Length of the payload item: variable
52 // Length of the payload item: variable
54 // Length of the payload item: variable
56 // Length of the payload item: variable
58 // Length of the payload item: variable
60 // No valid type codes can appear after this one.
61 PIT_MAX = 9
62 };
63
64 /**
65 Recovery Metadata message payload type name
66 */
67 std::map<int, std::string> m_payload_item_type_string{
68 {PIT_UNKNOWN, "Unknown Type"},
69 {PIT_VIEW_ID, "View ID"},
70 {PIT_RECOVERY_METADATA_COMPRESSION_TYPE, "Compression Type"},
71 {PIT_UNTIL_CONDITION_AFTER_GTIDS, "Executed Gtid Set"},
73 "Compressed Certification Info Packet Count"},
75 "Compressed Certification Info Payload"},
77 "Certification Info packet ucompressed length"},
78 {PIT_RECOVERY_METADATA_MESSAGE_ERROR, "Sender Message Error"},
79 {PIT_SENT_TIMESTAMP, "Sent Timestamp"}};
80
81 /**
82 Recovery Metadata message payload error
83 */
84 typedef enum {
85 /* GR Recovery Metadata no error */
87 /* GR Recovery Metadata send error */
90
91 /**
92 Recovery Metadata message error
93 */
95 // Recovery Metadata Message received/decoded without error.
97 // Received Recovery Metadata Message Certification Info is empty.
99 // Received Recovery Metadata Message executed gtid_set encoding error.
101 // Received Recovery Metadata Message payload buffer empty.
103 // Received Recovery Metadata Message payload type decoding error.
105 // Received Recovery Metadata Message payload decoding error.
107 // Received Recovery Metadata Message payload type not decoded.
109 // Received Recovery Metadata Message payload type not known.
111 };
112
113 /**
114 Message constructor
115
116 @param[in] view_id the view_id generated when new member joined
117 @param[in] error the message error type
118 @param[in] compression_type the compression type with which
119 Certification Information compressed
120 */
122 const std::string &view_id,
125 GR_compress::enum_compression_type compression_type =
127
128 /**
129 Message destructor
130 */
131 virtual ~Recovery_metadata_message() override;
132
133 /**
134 Message constructor for raw data
135
136 @param[in] buf raw data
137 @param[in] len raw length
138 */
139 Recovery_metadata_message(const uchar *buf, size_t len);
140
141 /**
142 Return the time at which the message contained in the buffer was sent.
143 @see Metrics_handler::get_current_time()
144
145 @param[in] buffer the buffer to decode from.
146 @param[in] length the buffer length
147
148 @return the time on which the message was sent.
149 */
150 static uint64_t get_sent_timestamp(const unsigned char *buffer,
151 size_t length);
152
153 /**
154 Return the message view_id which was generated when new member joined.
155
156 @return the view_id which was generated when new member joined.
157 */
158 std::string &get_encode_view_id();
159
160 /**
161 Return the message error type.
162
163 @return the Recovery_metadata_message_payload_error message error.
164 */
166
167 /**
168 Set the message error type
169 */
171
172 /**
173 Return the compression type with which Certification Information compressed.
174
175 @return the GR_compress::enum_compression_type compression type.
176 */
178
179 /**
180 Returns the gtid executed from the certification info map of the donor. It
181 is the set of transactions that is executed at the time of
182 view change at donor.
183
184 @return the reference to string containing the gtid executed from the
185 certification info map of the donor.
186 */
187 std::string &get_encode_group_gtid_executed();
188
189 /**
190 Returns the compressed Certification Information divided in multiple
191 elements of the vector.
192
193 @return the reference to vector containing compressed Certification
194 Information.
195 */
196 std::vector<GR_compress *> &get_encode_compressor_list();
197
198 /**
199 Set members joining the view.
200
201 @param[in] joining_members members joining the view
202 */
203 void set_joining_members(std::vector<Gcs_member_identifier> &joining_members);
204
205 /**
206 Set members ONLINE in the view.
207
208 @param[in] online_members members ONLINE in view
209 */
211 std::vector<Gcs_member_identifier> &online_members);
212
213 /**
214 Set the vector m_valid_metadata_sender_list.
215 */
217
218 /**
219 Set metadata sender.
220
221 @param[in] sender_gcs_id GCS Member ID of the sender.
222 */
224
225 /**
226 Check if recovery metadata donor has left the group.
227
228 @return the recovery metadata send status
229 @retval true donor left the group
230 @retval false donor is still on the group
231 true donor left
232
233 */
234 bool donor_left();
235
236 /**
237 Compute the current metadata sender and return the GCS Member ID of the
238 current metadata sender.
239
240 @return the Gcs_member_identifier of the current sender
241 */
242 std::pair<bool, Gcs_member_identifier>
244
245 /**
246 Checks if local member is metadata sender.
247
248 @note: compute_and_get_current_metadata_sender should be called before this
249 function to make sure metadata sender is updated. Since
250 am_i_recovery_metadata_sender will be called many times, compute of the
251 current metadata sender has been separated into
252 compute_and_get_current_metadata_sender.
253
254 @return the status if local member is metadata sender.
255 @retval false local member is recovery metadata sender.
256 @retval true local member is not recovery metadata sender.
257 */
259
260 /**
261 Remove the members that left the group from the joining and valid sender
262 list.
263
264 @param[in] member_left All GCS Member ID that left the group.
265 */
266 void delete_members_left(std::vector<Gcs_member_identifier> &member_left);
267
268 /**
269 Return if joiner and valid metadata sender list is empty or not.
270 If any of the list is empty true is return.
271
272 @return the recovery metadata send status
273 @retval false Atleast 1 joiner and valid metadata sender is present in
274 group
275 @retval true Either there are no joiner or valid metadata sender
276 */
278
279 /**
280 Save copy of undecoded metadata, so it can be decoded and used later when
281 required.
282
283 The metadata is broadcasted to all group members but only joiners require
284 after_gtids and compressed certification info part of metadata. And on all
285 other members only require view_id and metadata error part of metadata.
286 The view id and metadata error part only is decoded by GCS thread. Only
287 joiner require this rest of metadata part for receovery and processing on
288 GCS thread will block it for longer duration, so it's copy is saved in this
289 function and decoded by recovery thread.
290
291 @return the status showing metadata message second part saved success.
292 @retval false OK
293 @retval true Error
294 */
296
297 /**
298 Delete the saved copy of undecoded metadata.
299 */
301
302 /**
303 Set the decoded message error type
304 */
306
307 /**
308 Return view_id generated when new member joined.
309 Decodes and return view_id generated when new member joined. If the view_id
310 was decoded earlier it return saved view_id value.
311
312 @return the std::pair of <enum_recovery_metadata_message_error error type,
313 refernce to View ID string>
314 */
316 std::reference_wrapper<std::string>>
318
319 /**
320 Return the payload send message error received error in Recovery Metadata
321 message. If the payload send message error was decoded earlier it return
322 saved error value.
323
324 @return the std::pair of <enum_recovery_metadata_message_error error,
325 Recovery_metadata_message_payload_error
326 payload_error>.
327 */
331
332 /**
333 Return the compression type with which Certification Information compressed
334 in received Recovery Metadata message. If the compression type was already
335 decoded earlier it returns saved compression type value.
336
337 @return the std::pair of <enum_recovery_metadata_message_error error,
338 GR_compress::enum_compression_type>.
339 */
343
344 /**
345 Return the executed gtid set received from sender in received Recovery
346 Metadata message. If the executed gtid set was already decoded earlier it
347 returns saved executed gtid set value.
348
349 @return the std::pair of <enum_recovery_metadata_message_error error,
350 executed gtid set>.
351 */
353 std::reference_wrapper<std::string>>
355
356 /**
357 Return the Compressed Certification Info packet count received in Recovery
358 Metadata message. If the Compressed Certification Info packet count was
359 already decoded earlier it returns saved value.
360
361 @return the std::pair of <enum_recovery_metadata_message_error error,
362 Compress Certification Info packet count>.
363 */
364 std::pair<enum_recovery_metadata_message_error, unsigned int>
366
367 /**
368 Return the Certification Info packet's uncompressed_length i.e. size of
369 packet before compression. The Recovery Metadata message can have multiple
370 packets of Compressed Certification Info. If the start position argument is
371 provided the next Certification Info packet uncompressed_length packet type
372 i.e. PIT_COMPRESSED_CERTIFICATION_INFO_UNCOMPRESSED_LENGTH packet type is
373 searched and fetched after that position.
374
375 @param[in] payload_start_pos the next Certification Info packet
376 uncompressed_length packet type is searched
377 and fetched after the position.
378
379 @return the std::tuple of <enum_recovery_metadata_message_error error,
380 Certification Info packet uncompressed_length i.e. size of
381 packet before compression, length of uncompressed_length payload>.
382 */
384 unsigned long long, unsigned long long>
386 const unsigned char *payload_start_pos);
387
388 /**
389 Return the compressed Certification Info payload. The Recovery Metadata
390 message can have multiple packets of Compressed Certification Info. If
391 the start position argument is provided the next compressed Certification
392 Info packet type i.e. PIT_COMPRESSED_CERTIFICATION_INFO_PAYLOAD packet type
393 is searched and fetched after that position.
394
395 @param[in] payload_start_pos the next compressed Certification Info packet
396 packet type is searched and fetched after the
397 position.
398
399 @return the std::tuple of <enum_recovery_metadata_message_error error,
400 compressed Certification Info packet, length of compressed
401 Certification Info packet>.
402 */
404 const unsigned char *, unsigned long long>
406 const unsigned char *payload_start_pos);
407
408 protected:
409 /**
410 Encodes the message contents for transmission.
411
412 @param[out] buffer the message buffer to be written
413 */
414 void encode_payload(std::vector<unsigned char> *buffer) const override;
415
416 /**
417 Message decoding method
418
419 @param[in] buffer the received data
420 @param[in] end the end of the buffer
421 */
422 void decode_payload(const unsigned char *buffer,
423 const unsigned char *end) override;
424
425 private:
426 /**
427 Encodes the certification info for transmission.
428
429 @param[out] buffer the buffer to encode to
430
431 @return the operation status
432 @retval false OK
433 @retval true Error
434 */
436 std::vector<unsigned char> *buffer) const;
437
438 /** The view_id generated when new member joined */
439 std::string m_encode_view_id;
440
441 /** The enum_recovery_metadata_message_error message error type */
443
444 /** The compression type with which Certification Information compressed */
446
447 /**
448 The executed gtid set received from sender.
449 */
451
452 /**
453 Message decoding method to decode received metadata payload.
454 The metadata is broadcasted to all group members but only joiners require
455 after_gtids and compressed certification info part of metadata. And on all
456 other members only require view_id and metadata error part of metadata.
457
458 @param[in] payload_type the payload type to be decoded
459 @param[in] payload_start If payload_start is provided then payload types are
460 search from that position
461
462 @return the std::pair of payload type and
463 enum_recovery_metadata_message_error error type.
464 */
465 std::tuple<enum_recovery_metadata_message_error, const unsigned char *,
466 unsigned long long>
467 decode_payload_type(int payload_type,
468 const unsigned char *payload_start = nullptr) const;
469
470 /** The view_id received from sender. */
471 std::string m_decoded_view_id;
472
473 /**
474 The executed gtid set from sender.
475 */
477
478 /**
479 The pair of <enum_recovery_metadata_message_error error, View ID>.
480 The View ID generated when new member joined.
481 */
483 std::reference_wrapper<std::string>>
485
486 /**
487 The pair of <enum_recovery_metadata_message_error error,
488 Recovery_metadata_message_payload_error payload_error>.
489 The payload error is received error in Recovery Metadata message and
490 determines errors while delivering message to group.
491 */
497
498 /**
499 The pair of <enum_recovery_metadata_message_error error,
500 GR_compress::enum_compression_type>.
501 The compression type with which Certification Information compressed.
502 */
508
509 /**
510 The pair of <enum_recovery_metadata_message_error error,
511 executed gtid set>.
512 The executed gtid set is received from sender.
513 */
515 std::reference_wrapper<std::string>>
517
518 /**
519 The pair of <enum_recovery_metadata_message_error error,
520 Compress Certification Info packet count>.
521 The Compress Certification Info packet count is the number of compressed
522 Certification Info packets received from the Recovery Metadata sender.
523 */
524 std::pair<enum_recovery_metadata_message_error, unsigned int>
527 0};
528
529 /**
530 The tuple of <enum_recovery_metadata_message_error error,
531 Certification Info packet uncompressed_length i.e. size of
532 packet before compression,
533 length of uncompressed_length payload>.
534 */
536 unsigned long long, unsigned long long>
538
539 /**
540 The std::tuple of <enum_recovery_metadata_message_error error,
541 compressed Certification Info packet,
542 length of compressed Certification Info packet>.
543 */
545 const unsigned char *, unsigned long long>
547
548 /**
549 The Certification Information in compressed and serialized format,
550 used by the joining member for the recovery.
551 */
552 mutable std::vector<GR_compress *> m_encode_compressor_list;
553
554 /** The members joining in the view */
555 std::vector<Gcs_member_identifier> m_members_joined_in_view;
556
557 /** The members ONLINE in the view */
558 std::vector<Gcs_member_identifier> m_valid_metadata_senders;
559
560 /** The GCS Member ID of the member sending recovery metadata. */
562
563 // These variables are used for joiner recovery to mark position on message
564 // buffer to be decoded.
565 /**
566 This pointer is added to start of buffer part which is yet to be decoded.
567 The buffer is the metadata message payload received from metadata sender
568 members consisting of after_gtids, compressed certification info payload.
569 */
570 const unsigned char *m_decode_metadata_buffer;
571
572 /**
573 The metadata is broadcasted to all group members but only joiners require
574 after_gtids and compressed certification info part of metadata which is
575 processed by recovery thread, while view_id and metadata error part of
576 metadata required by other members is processed by GCS thread. The
577 processing of after_gtids and compressed certification info on GCS thread
578 will block it for longer duration, so it's copy is saved in this
579 */
581
582 /**
583 The end position of received metadata message payload.
584 */
585 const unsigned char *m_decode_metadata_end;
586
587 /**
588 The length of yet to be decoded part of buffer.
589 The buffer is the metadata message payload received from metadata sender
590 members consisting of after_gtids, compressed certification info payload.
591 */
593};
594
595#endif /* RECOVERY_METADATA_MESSAGE_INCLUDED */
enum_compression_type
Compression Type.
Definition: gr_compression.h:46
It represents the identity of a group member within a certain group.
Definition: gcs_member_identifier.h:40
This is the base GCS plugin message.
Definition: gcs_plugin_messages.h:64
Definition: recovery_metadata_message.h:36
std::pair< enum_recovery_metadata_message_error, std::reference_wrapper< std::string > > get_decoded_view_id()
Return view_id generated when new member joined.
Definition: recovery_metadata_message.cc:248
Recovery_metadata_message(const std::string &view_id, Recovery_metadata_message_payload_error error=RECOVERY_METADATA_NO_ERROR, GR_compress::enum_compression_type compression_type=GR_compress::enum_compression_type::ZSTD_COMPRESSION)
Message constructor.
Definition: recovery_metadata_message.cc:35
bool am_i_recovery_metadata_sender()
Checks if local member is metadata sender.
Definition: recovery_metadata_message.cc:688
void delete_members_left(std::vector< Gcs_member_identifier > &member_left)
Remove the members that left the group from the joining and valid sender list.
Definition: recovery_metadata_message.cc:699
std::string m_decoded_group_gtid_executed
The executed gtid set from sender.
Definition: recovery_metadata_message.h:476
std::string & get_encode_group_gtid_executed()
Returns the gtid executed from the certification info map of the donor.
Definition: recovery_metadata_message.cc:636
std::string m_encode_view_id
The view_id generated when new member joined.
Definition: recovery_metadata_message.h:439
std::map< int, std::string > m_payload_item_type_string
Recovery Metadata message payload type name.
Definition: recovery_metadata_message.h:67
enum_recovery_metadata_message_error
Recovery Metadata message error.
Definition: recovery_metadata_message.h:94
std::vector< GR_compress * > & get_encode_compressor_list()
Returns the compressed Certification Information divided in multiple elements of the vector.
Definition: recovery_metadata_message.cc:641
std::pair< enum_recovery_metadata_message_error, Recovery_metadata_message_payload_error > m_decoded_message_send_error
The pair of <enum_recovery_metadata_message_error error, Recovery_metadata_message_payload_error payl...
Definition: recovery_metadata_message.h:494
Recovery_metadata_message_payload_error m_encode_metadata_message_error
The enum_recovery_metadata_message_error message error type.
Definition: recovery_metadata_message.h:442
void set_metadata_sender(Gcs_member_identifier &sender_gcs_id)
Set metadata sender.
std::pair< enum_recovery_metadata_message_error, Recovery_metadata_message_payload_error > get_decoded_message_error()
Return the payload send message error received error in Recovery Metadata message.
Definition: recovery_metadata_message.cc:288
void delete_copy_of_recovery_metadata_payload()
Delete the saved copy of undecoded metadata.
Definition: recovery_metadata_message.cc:163
GR_compress::enum_compression_type get_encode_compression_type()
Return the compression type with which Certification Information compressed.
Definition: recovery_metadata_message.cc:632
std::vector< Gcs_member_identifier > m_valid_metadata_senders
The members ONLINE in the view.
Definition: recovery_metadata_message.h:558
std::tuple< Recovery_metadata_message::enum_recovery_metadata_message_error, unsigned long long, unsigned long long > get_decoded_compressed_certification_info_uncompressed_length(const unsigned char *payload_start_pos)
Return the Certification Info packet's uncompressed_length i.e.
Definition: recovery_metadata_message.cc:456
void set_valid_metadata_senders(std::vector< Gcs_member_identifier > &online_members)
Set members ONLINE in the view.
Definition: recovery_metadata_message.cc:654
std::vector< GR_compress * > m_encode_compressor_list
The Certification Information in compressed and serialized format, used by the joining member for the...
Definition: recovery_metadata_message.h:552
std::string & get_encode_view_id()
Return the message view_id which was generated when new member joined.
Definition: recovery_metadata_message.cc:622
void set_decoded_message_error()
Set the decoded message error type.
Definition: recovery_metadata_message.cc:137
std::pair< bool, Gcs_member_identifier > compute_and_get_current_metadata_sender()
Compute the current metadata sender and return the GCS Member ID of the current metadata sender.
Definition: recovery_metadata_message.cc:677
void encode_payload(std::vector< unsigned char > *buffer) const override
Encodes the message contents for transmission.
Definition: recovery_metadata_message.cc:534
enum_payload_item_type
Recovery Metadata message payload type.
Definition: recovery_metadata_message.h:41
@ PIT_RECOVERY_METADATA_COMPRESSION_TYPE
Definition: recovery_metadata_message.h:47
@ PIT_COMPRESSED_CERTIFICATION_INFO_PAYLOAD
Definition: recovery_metadata_message.h:53
@ PIT_COMPRESSED_CERTIFICATION_INFO_UNCOMPRESSED_LENGTH
Definition: recovery_metadata_message.h:55
@ PIT_SENT_TIMESTAMP
Definition: recovery_metadata_message.h:59
@ PIT_MAX
Definition: recovery_metadata_message.h:61
@ PIT_COMPRESSED_CERTIFICATION_INFO_PACKET_COUNT
Definition: recovery_metadata_message.h:51
@ PIT_UNTIL_CONDITION_AFTER_GTIDS
Definition: recovery_metadata_message.h:49
@ PIT_UNKNOWN
Definition: recovery_metadata_message.h:43
@ PIT_VIEW_ID
Definition: recovery_metadata_message.h:45
@ PIT_RECOVERY_METADATA_MESSAGE_ERROR
Definition: recovery_metadata_message.h:57
Recovery_metadata_message_payload_error get_encode_message_error()
Return the message error type.
Definition: recovery_metadata_message.cc:627
virtual ~Recovery_metadata_message() override
Message destructor.
Definition: recovery_metadata_message.cc:108
std::pair< enum_recovery_metadata_message_error, std::reference_wrapper< std::string > > get_decoded_group_gtid_executed()
Return the executed gtid set received from sender in received Recovery Metadata message.
Definition: recovery_metadata_message.cc:350
std::pair< enum_recovery_metadata_message_error, unsigned int > m_decoded_certification_info_packet_count_error
The pair of <enum_recovery_metadata_message_error error, Compress Certification Info packet count>.
Definition: recovery_metadata_message.h:525
std::tuple< enum_recovery_metadata_message_error, const unsigned char *, unsigned long long > decode_payload_type(int payload_type, const unsigned char *payload_start=nullptr) const
Message decoding method to decode received metadata payload.
Definition: recovery_metadata_message.cc:177
std::pair< enum_recovery_metadata_message_error, GR_compress::enum_compression_type > get_decoded_compression_type()
Return the compression type with which Certification Information compressed in received Recovery Meta...
Definition: recovery_metadata_message.cc:319
std::pair< enum_recovery_metadata_message_error, GR_compress::enum_compression_type > m_decoded_compression_type_error
The pair of <enum_recovery_metadata_message_error error, GR_compress::enum_compression_type>.
Definition: recovery_metadata_message.h:505
Recovery_metadata_message_payload_error
Recovery Metadata message payload error.
Definition: recovery_metadata_message.h:84
@ RECOVERY_METADATA_NO_ERROR
Definition: recovery_metadata_message.h:86
@ RECOVERY_METADATA_ERROR
Definition: recovery_metadata_message.h:88
static uint64_t get_sent_timestamp(const unsigned char *buffer, size_t length)
Return the time at which the message contained in the buffer was sent.
Definition: recovery_metadata_message.cc:239
std::pair< enum_recovery_metadata_message_error, std::reference_wrapper< std::string > > m_decoded_group_gtid_executed_error
The pair of <enum_recovery_metadata_message_error error, executed gtid set>.
Definition: recovery_metadata_message.h:516
std::pair< enum_recovery_metadata_message_error, unsigned int > get_decoded_compressed_certification_info_packet_count()
Return the Compressed Certification Info packet count received in Recovery Metadata message.
Definition: recovery_metadata_message.cc:408
std::tuple< Recovery_metadata_message::enum_recovery_metadata_message_error, const unsigned char *, unsigned long long > m_decoded_compressed_certification_info_error
The std::tuple of <enum_recovery_metadata_message_error error, compressed Certification Info packet,...
Definition: recovery_metadata_message.h:546
bool donor_left()
Check if recovery metadata donor has left the group.
Definition: recovery_metadata_message.cc:693
bool m_decode_is_metadata_buffer_local_copy
The metadata is broadcasted to all group members but only joiners require after_gtids and compressed ...
Definition: recovery_metadata_message.h:580
std::pair< enum_recovery_metadata_message_error, std::reference_wrapper< std::string > > m_decoded_view_id_error
The pair of <enum_recovery_metadata_message_error error, View ID>.
Definition: recovery_metadata_message.h:484
std::string m_decoded_view_id
The view_id received from sender.
Definition: recovery_metadata_message.h:471
Gcs_member_identifier m_member_id_sending_metadata
The GCS Member ID of the member sending recovery metadata.
Definition: recovery_metadata_message.h:561
std::vector< Gcs_member_identifier > m_members_joined_in_view
The members joining in the view.
Definition: recovery_metadata_message.h:555
const unsigned char * m_decode_metadata_end
The end position of received metadata message payload.
Definition: recovery_metadata_message.h:585
const unsigned char * m_decode_metadata_buffer
This pointer is added to start of buffer part which is yet to be decoded.
Definition: recovery_metadata_message.h:570
bool is_joiner_or_valid_sender_list_empty()
Return if joiner and valid metadata sender list is empty or not.
Definition: recovery_metadata_message.cc:721
void sort_valid_metadata_sender_list_using_uuid()
Set the vector m_valid_metadata_sender_list.
Definition: recovery_metadata_message.cc:660
std::string m_encoded_group_gtid_executed
The executed gtid set received from sender.
Definition: recovery_metadata_message.h:450
GR_compress::enum_compression_type m_encode_metadata_compression_type
The compression type with which Certification Information compressed.
Definition: recovery_metadata_message.h:445
void set_encode_message_error()
Set the message error type.
Definition: recovery_metadata_message.cc:645
void decode_payload(const unsigned char *buffer, const unsigned char *end) override
Message decoding method.
Definition: recovery_metadata_message.cc:119
std::tuple< Recovery_metadata_message::enum_recovery_metadata_message_error, unsigned long long, unsigned long long > m_decoded_certification_info_uncompressed_length_error
The tuple of <enum_recovery_metadata_message_error error, Certification Info packet uncompressed_leng...
Definition: recovery_metadata_message.h:537
size_t m_decode_metadata_length
The length of yet to be decoded part of buffer.
Definition: recovery_metadata_message.h:592
void set_joining_members(std::vector< Gcs_member_identifier > &joining_members)
Set members joining the view.
Definition: recovery_metadata_message.cc:649
std::tuple< Recovery_metadata_message::enum_recovery_metadata_message_error, const unsigned char *, unsigned long long > get_decoded_compressed_certification_info_payload(const unsigned char *payload_start_pos)
Return the compressed Certification Info payload.
Definition: recovery_metadata_message.cc:500
bool save_copy_of_recovery_metadata_payload()
Save copy of undecoded metadata, so it can be decoded and used later when required.
Definition: recovery_metadata_message.cc:141
bool encode_compressed_certification_info_payload(std::vector< unsigned char > *buffer) const
Encodes the certification info for transmission.
Definition: recovery_metadata_message.cc:582
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:52
Definition: buf0block_hint.cc:30
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:418
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192