MySQL 8.3.0
Source Code Documentation
pipeline_stats.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 2023, 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 also distributed 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 included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef PIPELINE_STATS_INCLUDED
24#define PIPELINE_STATS_INCLUDED
25
26#include <map>
27#include <string>
28#include <vector>
29
31#include "my_inttypes.h"
34
35/**
36 Flow control modes:
37 FCM_DISABLED flow control disabled
38 FCM_QUOTA introduces a delay only on transactions the exceed a quota
39*/
41
42/**
43 @class Pipeline_stats_member_message
44
45 Describes all statistics sent by members.
46*/
48 public:
50 // This type should not be used anywhere.
52
53 // Length of the payload item: 4 bytes
55
56 // Length of the payload item: 4 bytes
58
59 // Length of the payload item: 8 bytes
61
62 // Length of the payload item: 8 bytes
64
65 // Length of the payload item: 8 bytes
67
68 // Length of the payload item: 8 bytes
70
71 // Length of the payload item: 8 bytes
73
74 // Length of the payload item: variable
76
77 // Length of the payload item: variable
79
80 // Length of the payload item: 8 bytes
82
83 // Length of the payload item: 1 byte
85
86 // Length of the payload item: 1 byte
88
89 // Length of the payload item: 8 bytes
91
92 // No valid type codes can appear after this one.
93 PIT_MAX = 14
94 };
95
96 /**
97 Message constructor
98
99 @param[in] transactions_waiting_certification
100 Number of transactions pending certification
101 @param[in] transactions_waiting_apply
102 Number of remote transactions waiting apply
103 @param[in] transactions_certified
104 Number of transactions already certified
105 @param[in] transactions_applied
106 Number of remote transactions applied
107 @param[in] transactions_local
108 Number of local transactions
109 @param[in] transactions_negative_certified
110 Number of transactions that were negatively certified
111 @param[in] transactions_rows_validating
112 Number of transactions with which certification will be done
113 against
114 @param[in] transaction_gtids
115 Flag to indicate whether or not the transaction ids have been
116 updated
117 @param[in] transactions_committed_all_members
118 Set of transactions committed on all members
119 @param[in] transactions_last_conflict_free
120 Latest transaction certified without conflicts
121 @param[in] transactions_local_rollback
122 Number of local transactions that were negatively certified
123 @param[in] mode
124 Flow-control mode
125 */
127 int32 transactions_waiting_certification,
128 int32 transactions_waiting_apply, int64 transactions_certified,
129 int64 transactions_applied, int64 transactions_local,
130 int64 transactions_negative_certified, int64 transactions_rows_validating,
131 bool transaction_gtids,
132 const std::string &transactions_committed_all_members,
133 const std::string &transactions_last_conflict_free,
134 int64 transactions_local_rollback, Flow_control_mode mode);
135
136 /**
137 Message constructor for raw data
138
139 @param[in] buf raw data
140 @param[in] len raw length
141 */
142 Pipeline_stats_member_message(const unsigned char *buf, size_t len);
143
144 /**
145 Message destructor
146 */
148
149 /**
150 Get transactions waiting certification counter value.
151
152 @return the counter value
153 */
155
156 /**
157 Get transactions waiting apply counter value.
158
159 @return the counter value
160 */
162
163 /**
164 Get transactions certified.
165
166 @return the counter value
167 */
169
170 /**
171 Get transactions applied.
172
173 @return the counter value
174 */
176
177 /**
178 Get local transactions that member tried to commit.
179
180 @return the counter value
181 */
183
184 /**
185 Get negatively certified transaction by member.
186
187 @return the counter value
188 */
190
191 /**
192 Get size of conflict detection database.
193
194 @return the counter value
195 */
197
198 /**
199 Returns a flag indicating whether or not the GTIDs on this stats message
200 are updated/present.
201
202 @return the flag indicating the presence of valid GTIDs on this message.
203 */
204 bool get_transation_gtids_present() const;
205
206 /**
207 Get set of stable group transactions.
208
209 @return the transaction identifier.
210 */
211 const std::string &get_transaction_committed_all_members();
212
213 /**
214 Get last positive certified transaction.
215
216 @return the transaction identifier.
217 */
218 const std::string &get_transaction_last_conflict_free();
219
220 /**
221 Get local transactions rolled back by the member.
222
223 @return the transaction identifiers.
224 */
226
227 /**
228 Get flow-control mode of member.
229
230 @return the mode value
231 */
233
234 /**
235 Return the time at which the message contained in the buffer was sent.
236 @see Metrics_handler::get_current_time()
237
238 @param[in] buffer the buffer to decode from.
239 @param[in] length the buffer length
240
241 @return the time on which the message was sent.
242 */
243 static uint64_t get_sent_timestamp(const unsigned char *buffer,
244 size_t length);
245
246 protected:
247 /**
248 Encodes the message contents for transmission.
249
250 @param[out] buffer the message buffer to be written
251 */
252 void encode_payload(std::vector<unsigned char> *buffer) const override;
253
254 /**
255 Message decoding method
256
257 @param[in] buffer the received data
258 @param[in] end the end of the buffer
259 */
260 void decode_payload(const unsigned char *buffer,
261 const unsigned char *end) override;
262
263 private:
276};
277
278/**
279 @class Pipeline_stats_member_collector
280
281 The pipeline collector for the local member stats.
282*/
284 public:
285 /**
286 Default constructor.
287 */
289
290 /**
291 Destructor.
292 */
294
295 /**
296 Increment transactions waiting apply counter value.
297 */
299
300 /**
301 Decrement transactions waiting apply counter value.
302 */
304
305 /**
306 Set transactions waiting apply counter to 0.
307 */
309
310 /**
311 Increment transactions certified counter value.
312 */
314
315 /**
316 Increment transactions applied counter value.
317 */
319
320 /**
321 Increment local transactions counter value.
322 */
324
325 /**
326 Increment local rollback transactions counter value.
327 */
329
330 /**
331 Send member statistics to group.
332 */
334
335 /**
336 Increment local recovery transactions counter value.
337 */
339
340 /**
341 @returns transactions waiting to be applied during recovery.
342 */
344
345 /**
346 Increment delivered transactions during recovery counter value.
347 */
349
350 /**
351 Increment certified transactions during recovery counter value.
352 */
354
355 /**
356 Increment negatively certified transactions during recovery counter value.
357 */
359
360 /**
361 @returns transactions waiting to be certified during recovery.
362 */
364
365 /**
366 Compute the transactions applied during last flow-control tick
367 while the member is in recovery.
368 */
370
371 /**
372 @returns transactions applied during last flow-control tick
373 while the member is in recovery.
374 */
376
377 /**
378 @returns transactions waiting to be applied.
379 */
381
382 /**
383 @returns transactions certified.
384 */
386
387 /**
388 @returns transactions applied of local member.
389 */
391
392 /**
393 @returns local transactions proposed by member.
394 */
396
397 /**
398 @returns local transactions rollback due to Negative certification
399 */
401
402 /**
403 Send Transaction Identifiers or not.
404 Once Transactions identifiers are sent, variable will be reset to FALSE
405 So need to set each time Transactions identifiers needs to be transmitted
406 */
408
409 private:
411 std::atomic<int64> m_transactions_certified;
412 std::atomic<int64> m_transactions_applied;
413 std::atomic<int64> m_transactions_local;
415 /* Includes both positively and negatively certified. */
422
425};
426
427/**
428 @class Pipeline_member_stats
429
430 Computed statistics per member.
431*/
433 public:
434 /**
435 Default constructor.
436 */
438
439 /**
440 Constructor.
441 */
443
444 /**
445 Constructor.
446 */
448 ulonglong applier_queue, ulonglong negative_certified,
449 ulonglong certificatin_size);
450
451 /**
452 Updates member statistics with a new message from the network
453 */
455
456 /**
457 Returns true if the node is behind on some user-defined criteria
458 */
460
461 /**
462 Get transactions waiting certification counter value.
463
464 @return the counter value
465 */
467
468 /**
469 Get transactions waiting apply counter value.
470
471 @return the counter value
472 */
474
475 /**
476 Get transactions certified counter value.
477
478 @return the counter value
479 */
481
482 /**
483 Get transactions applied counter value.
484
485 @return the counter value
486 */
488
489 /**
490 Get local member transactions proposed counter value.
491
492 @return the counter value
493 */
495
496 /**
497 Get transactions negatively certified.
498
499 @return the counter value
500 */
502
503 /**
504 Get certification database counter value.
505
506 @return the counter value
507 */
509
510 /**
511 Get the stable group transactions.
512 */
513 void get_transaction_committed_all_members(std::string &value);
514
515 /**
516 Set the stable group transactions.
517 */
518 void set_transaction_committed_all_members(char *str, size_t len);
519
520 /**
521 Get the last positive certified transaction.
522 */
523 void get_transaction_last_conflict_free(std::string &value);
524
525 /**
526 Set the last positive certified transaction.
527 */
528 void set_transaction_last_conflict_free(std::string &value);
529
530 /**
531 Get local member transactions negatively certified.
532
533 @return the counter value
534 */
536
537 /**
538 Get transactions certified since last stats message.
539
540 @return the counter value
541 */
543
544 /**
545 Get transactions applied since last stats message.
546
547 @return the counter value
548 */
550
551 /**
552 Get local transactions that member tried to commit
553 since last stats message.
554
555 @return the counter value
556 */
558
559 /**
560 Get flow_control_mode of a member.
561
562 @return the mode value
563 */
565
566 /**
567 Get the last stats update stamp.
568
569 @return the counter value
570 */
572
573#ifndef NDEBUG
574 void debug(const char *member, int64 quota_size, int64 quota_used);
575#endif
576
577 private:
593};
594
595/**
596 Data type that holds all members stats.
597 The key value is the GCS member_id.
598*/
599typedef std::map<std::string, Pipeline_member_stats> Flow_control_module_info;
600
601/**
602 @class Flow_control_module
603
604 The pipeline stats aggregator of all group members stats and
605 flow control module.
606*/
608 public:
609 static const int64 MAXTPS;
610
611 /**
612 Default constructor.
613 */
615
616 /**
617 Destructor.
618 */
619 virtual ~Flow_control_module();
620
621 /**
622 Handles a Pipeline_stats_message, updating the
623 Flow_control_module_info and the delay, if needed.
624
625 @param[in] data the packet data
626 @param[in] len the packet length
627 @param[in] member_id the GCS member_id which sent the message
628
629 @return the operation status
630 @retval 0 OK
631 @retval !=0 Error on queue
632 */
633 int handle_stats_data(const uchar *data, size_t len,
634 const std::string &member_id);
635
636 /**
637 Evaluate the information received in the last flow control period
638 and adjust the system parameters accordingly
639 */
641
642 /**
643 Returns copy of individual member stats information.
644 @note Its caller responsibility to clean up allocated memory.
645
646 @param[in] member_id GCS Type Member Id, i.e. format HOST:PORT
647 @return the reference to class Pipeline_member_stats of memberID
648 storing network(GCS Broadcasted) received information
649 */
650 Pipeline_member_stats *get_pipeline_stats(const std::string &member_id);
651
652 /**
653 Compute and wait the amount of time in microseconds that must
654 be elapsed before a new message is sent.
655 If there is no need to wait, the method returns immediately.
656
657 @return the wait time
658 @retval 0 No wait was done
659 @retval >0 The wait time
660 */
661 int32 do_wait();
662
663 private:
666
668 /*
669 A rw lock to protect the Flow_control_module_info map.
670 */
672
673 /*
674 Number of members that did have waiting transactions on
675 certification and/or apply.
676 */
677 std::atomic<int32> m_holds_in_period;
678
679 /*
680 FCM_QUOTA
681 */
682 std::atomic<int64> m_quota_used;
683 std::atomic<int64> m_quota_size;
684
685 /*
686 Counter incremented on every flow control step.
687 */
689
690 /*
691 Remaining seconds to skip flow-control steps
692 */
694};
695
696#endif /* PIPELINE_STATS_INCLUDED */
This has the functionality of mysql_rwlock_t, with two differences:
Definition: rpl_gtid.h:323
The pipeline stats aggregator of all group members stats and flow control module.
Definition: pipeline_stats.h:607
Flow_control_module()
Default constructor.
Definition: pipeline_stats.cc:725
Flow_control_module_info m_info
Definition: pipeline_stats.h:667
int seconds_to_skip
Definition: pipeline_stats.h:693
std::atomic< int64 > m_quota_used
Definition: pipeline_stats.h:682
static const int64 MAXTPS
Definition: pipeline_stats.h:609
int32 do_wait()
Compute and wait the amount of time in microseconds that must be elapsed before a new message is sent...
Definition: pipeline_stats.cc:1001
mysql_cond_t m_flow_control_cond
Definition: pipeline_stats.h:665
virtual ~Flow_control_module()
Destructor.
Definition: pipeline_stats.cc:742
void flow_control_step(Pipeline_stats_member_collector *)
Evaluate the information received in the last flow control period and adjust the system parameters ac...
Definition: pipeline_stats.cc:748
mysql_mutex_t m_flow_control_lock
Definition: pipeline_stats.h:664
std::atomic< int32 > m_holds_in_period
Definition: pipeline_stats.h:677
int handle_stats_data(const uchar *data, size_t len, const std::string &member_id)
Handles a Pipeline_stats_message, updating the Flow_control_module_info and the delay,...
Definition: pipeline_stats.cc:942
uint64 m_stamp
Definition: pipeline_stats.h:688
Pipeline_member_stats * get_pipeline_stats(const std::string &member_id)
Returns copy of individual member stats information.
Definition: pipeline_stats.cc:979
std::atomic< int64 > m_quota_size
Definition: pipeline_stats.h:683
Checkable_rwlock * m_flow_control_module_info_lock
Definition: pipeline_stats.h:671
Computed statistics per member.
Definition: pipeline_stats.h:432
std::string m_transaction_last_conflict_free
Definition: pipeline_stats.h:589
int64 m_delta_transactions_certified
Definition: pipeline_stats.h:581
void set_transaction_committed_all_members(char *str, size_t len)
Set the stable group transactions.
Definition: pipeline_stats.cc:691
Flow_control_mode m_flow_control_mode
Definition: pipeline_stats.h:591
void get_transaction_last_conflict_free(std::string &value)
Get the last positive certified transaction.
Definition: pipeline_stats.cc:696
int64 m_transactions_applied
Definition: pipeline_stats.h:582
uint64 get_stamp()
Get the last stats update stamp.
Definition: pipeline_stats.cc:710
int64 get_transactions_certified()
Get transactions certified counter value.
Definition: pipeline_stats.cc:662
int64 m_delta_transactions_local
Definition: pipeline_stats.h:585
int32 m_transactions_waiting_certification
Definition: pipeline_stats.h:578
void set_transaction_last_conflict_free(std::string &value)
Set the last positive certified transaction.
Definition: pipeline_stats.cc:701
int64 get_transactions_local()
Get local member transactions proposed counter value.
Definition: pipeline_stats.cc:670
int64 get_transactions_negative_certified()
Get transactions negatively certified.
Definition: pipeline_stats.cc:674
std::string m_transactions_committed_all_members
Definition: pipeline_stats.h:588
int64 get_delta_transactions_applied()
Get transactions applied since last stats message.
Definition: pipeline_stats.cc:654
int32 get_transactions_waiting_certification()
Get transactions waiting certification counter value.
Definition: pipeline_stats.cc:642
uint64 m_stamp
Definition: pipeline_stats.h:592
Flow_control_mode get_flow_control_mode()
Get flow_control_mode of a member.
Definition: pipeline_stats.cc:706
int32 get_transactions_waiting_apply()
Get transactions waiting apply counter value.
Definition: pipeline_stats.cc:646
Pipeline_member_stats()
Default constructor.
Definition: pipeline_stats.cc:531
int64 m_transactions_local
Definition: pipeline_stats.h:584
void debug(const char *member, int64 quota_size, int64 quota_used)
Definition: pipeline_stats.cc:713
void get_transaction_committed_all_members(std::string &value)
Get the stable group transactions.
Definition: pipeline_stats.cc:686
int64 m_transactions_negative_certified
Definition: pipeline_stats.h:586
int64 m_transactions_rows_validating
Definition: pipeline_stats.h:587
int64 m_transactions_certified
Definition: pipeline_stats.h:580
int32 m_transactions_waiting_apply
Definition: pipeline_stats.h:579
int64 get_transactions_rows_validating()
Get certification database counter value.
Definition: pipeline_stats.cc:678
void update_member_stats(Pipeline_stats_member_message &msg, uint64 stamp)
Updates member statistics with a new message from the network.
Definition: pipeline_stats.cc:589
int64 get_delta_transactions_certified()
Get transactions certified since last stats message.
Definition: pipeline_stats.cc:650
int64 m_transactions_local_rollback
Definition: pipeline_stats.h:590
int64 get_delta_transactions_local()
Get local transactions that member tried to commit since last stats message.
Definition: pipeline_stats.cc:658
bool is_flow_control_needed()
Returns true if the node is behind on some user-defined criteria.
Definition: pipeline_stats.cc:634
int64 m_delta_transactions_applied
Definition: pipeline_stats.h:583
int64 get_transactions_local_rollback()
Get local member transactions negatively certified.
Definition: pipeline_stats.cc:682
int64 get_transactions_applied()
Get transactions applied counter value.
Definition: pipeline_stats.cc:666
The pipeline collector for the local member stats.
Definition: pipeline_stats.h:283
int64 get_transactions_local_rollback()
Definition: pipeline_stats.cc:407
void decrement_transactions_waiting_apply()
Decrement transactions waiting apply counter value.
Definition: pipeline_stats.cc:369
std::atomic< uint64 > m_delta_transactions_applied_during_recovery
Definition: pipeline_stats.h:420
void increment_transactions_applied()
Increment transactions applied counter value.
Definition: pipeline_stats.cc:379
std::atomic< int64 > m_transactions_certified
Definition: pipeline_stats.h:411
Pipeline_stats_member_collector()
Default constructor.
Definition: pipeline_stats.cc:335
void clear_transactions_waiting_apply()
Set transactions waiting apply counter to 0.
Definition: pipeline_stats.cc:356
std::atomic< uint64 > m_transactions_certified_during_recovery
Definition: pipeline_stats.h:416
int64 get_transactions_applied()
Definition: pipeline_stats.cc:399
void increment_transactions_certified()
Increment transactions certified counter value.
Definition: pipeline_stats.cc:375
void increment_transactions_local()
Increment local transactions counter value.
Definition: pipeline_stats.cc:383
void compute_transactions_deltas_during_recovery()
Compute the transactions applied during last flow-control tick while the member is in recovery.
Definition: pipeline_stats.cc:431
void send_stats_member_message(Flow_control_mode mode)
Send member statistics to group.
Definition: pipeline_stats.cc:478
uint64 get_delta_transactions_applied_during_recovery()
Definition: pipeline_stats.cc:440
std::atomic< uint64 > m_transactions_certified_negatively_during_recovery
Definition: pipeline_stats.h:417
std::atomic< int64 > m_transactions_local_rollback
Definition: pipeline_stats.h:414
void increment_transactions_certified_during_recovery()
Increment certified transactions during recovery counter value.
Definition: pipeline_stats.cc:416
std::atomic< int64 > m_transactions_applied
Definition: pipeline_stats.h:412
void increment_transactions_waiting_apply()
Increment transactions waiting apply counter value.
Definition: pipeline_stats.cc:362
mysql_mutex_t m_transactions_waiting_apply_lock
Definition: pipeline_stats.h:424
std::atomic< uint64 > m_transactions_delivered_during_recovery
Definition: pipeline_stats.h:421
uint64 get_transactions_waiting_apply_during_recovery()
Definition: pipeline_stats.cc:445
void increment_transactions_certified_negatively_during_recovery()
Increment negatively certified transactions during recovery counter value.
Definition: pipeline_stats.cc:421
int32 get_transactions_waiting_apply()
Definition: pipeline_stats.cc:391
uint64 m_previous_transactions_applied_during_recovery
Definition: pipeline_stats.h:419
uint64 get_transactions_waiting_certification_during_recovery()
Definition: pipeline_stats.cc:471
void increment_transactions_applied_during_recovery()
Increment local recovery transactions counter value.
Definition: pipeline_stats.cc:426
void increment_transactions_local_rollback()
Increment local rollback transactions counter value.
Definition: pipeline_stats.cc:387
int64 get_transactions_local()
Definition: pipeline_stats.cc:403
bool send_transaction_identifiers
Definition: pipeline_stats.h:423
void set_send_transaction_identifiers()
Send Transaction Identifiers or not.
Definition: pipeline_stats.cc:411
std::atomic< int64 > m_transactions_local
Definition: pipeline_stats.h:413
std::atomic< int32 > m_transactions_waiting_apply
Definition: pipeline_stats.h:410
int64 get_transactions_certified()
Definition: pipeline_stats.cc:395
std::atomic< uint64 > m_transactions_applied_during_recovery
Definition: pipeline_stats.h:418
void increment_transactions_delivered_during_recovery()
Increment delivered transactions during recovery counter value.
Definition: pipeline_stats.cc:466
virtual ~Pipeline_stats_member_collector()
Destructor.
Definition: pipeline_stats.cc:352
Describes all statistics sent by members.
Definition: pipeline_stats.h:47
int64 m_transactions_rows_validating
Definition: pipeline_stats.h:270
enum_payload_item_type
Definition: pipeline_stats.h:49
@ PIT_TRANSACTIONS_CERTIFIED
Definition: pipeline_stats.h:60
@ PIT_TRANSACTIONS_COMMITTED_ALL_MEMBERS
Definition: pipeline_stats.h:75
@ PIT_TRANSACTION_LAST_CONFLICT_FREE
Definition: pipeline_stats.h:78
@ PIT_TRANSACTIONS_APPLIED
Definition: pipeline_stats.h:63
@ PIT_TRANSACTIONS_NEGATIVE_CERTIFIED
Definition: pipeline_stats.h:69
@ PIT_TRANSACTIONS_LOCAL_ROLLBACK
Definition: pipeline_stats.h:81
@ PIT_MAX
Definition: pipeline_stats.h:93
@ PIT_TRANSACTIONS_WAITING_CERTIFICATION
Definition: pipeline_stats.h:54
@ PIT_TRANSACTION_GTIDS_PRESENT
Definition: pipeline_stats.h:87
@ PIT_TRANSACTIONS_WAITING_APPLY
Definition: pipeline_stats.h:57
@ PIT_SENT_TIMESTAMP
Definition: pipeline_stats.h:90
@ PIT_TRANSACTIONS_LOCAL
Definition: pipeline_stats.h:66
@ PIT_UNKNOWN
Definition: pipeline_stats.h:51
@ PIT_TRANSACTIONS_ROWS_VALIDATING
Definition: pipeline_stats.h:72
@ PIT_FLOW_CONTROL_MODE
Definition: pipeline_stats.h:84
int32 get_transactions_waiting_certification()
Get transactions waiting certification counter value.
Definition: pipeline_stats.cc:109
Flow_control_mode m_flow_control_mode
Definition: pipeline_stats.h:275
int64 m_transactions_local_rollback
Definition: pipeline_stats.h:274
std::string m_transaction_last_conflict_free
Definition: pipeline_stats.h:273
bool m_transaction_gtids_present
Definition: pipeline_stats.h:271
int32 get_transactions_waiting_apply()
Get transactions waiting apply counter value.
Definition: pipeline_stats.cc:119
int64 m_transactions_applied
Definition: pipeline_stats.h:267
int64 get_transactions_local_rollback()
Get local transactions rolled back by the member.
Definition: pipeline_stats.cc:148
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: pipeline_stats.cc:328
Pipeline_stats_member_message(int32 transactions_waiting_certification, int32 transactions_waiting_apply, int64 transactions_certified, int64 transactions_applied, int64 transactions_local, int64 transactions_negative_certified, int64 transactions_rows_validating, bool transaction_gtids, const std::string &transactions_committed_all_members, const std::string &transactions_last_conflict_free, int64 transactions_local_rollback, Flow_control_mode mode)
Message constructor.
Definition: pipeline_stats.cc:67
int64 get_transactions_negative_certified()
Get negatively certified transaction by member.
Definition: pipeline_stats.cc:134
~Pipeline_stats_member_message() override
Message destructor.
void encode_payload(std::vector< unsigned char > *buffer) const override
Encodes the message contents for transmission.
Definition: pipeline_stats.cc:170
int64 get_transactions_local()
Get local transactions that member tried to commit.
Definition: pipeline_stats.cc:129
int64 get_transactions_certified()
Get transactions certified.
Definition: pipeline_stats.cc:114
std::string m_transactions_committed_all_members
Definition: pipeline_stats.h:272
void decode_payload(const unsigned char *buffer, const unsigned char *end) override
Message decoding method.
Definition: pipeline_stats.cc:230
const std::string & get_transaction_last_conflict_free()
Get last positive certified transaction.
Definition: pipeline_stats.cc:160
int32 m_transactions_waiting_certification
Definition: pipeline_stats.h:264
int32 m_transactions_waiting_apply
Definition: pipeline_stats.h:265
Flow_control_mode get_flow_control_mode()
Get flow-control mode of member.
Definition: pipeline_stats.cc:165
const std::string & get_transaction_committed_all_members()
Get set of stable group transactions.
Definition: pipeline_stats.cc:154
int64 m_transactions_certified
Definition: pipeline_stats.h:266
bool get_transation_gtids_present() const
Returns a flag indicating whether or not the GTIDs on this stats message are updated/present.
Definition: pipeline_stats.cc:144
int64 m_transactions_negative_certified
Definition: pipeline_stats.h:269
int64 m_transactions_local
Definition: pipeline_stats.h:268
int64 get_transactions_applied()
Get transactions applied.
Definition: pipeline_stats.cc:124
int64 get_transactions_rows_validating()
Get size of conflict detection database.
Definition: pipeline_stats.cc:139
This is the base GCS plugin message.
Definition: gcs_plugin_messages.h:63
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:55
unsigned char uchar
Definition: my_inttypes.h:51
int64_t int64
Definition: my_inttypes.h:67
int32_t int32
Definition: my_inttypes.h:65
uint64_t uint64
Definition: my_inttypes.h:68
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1065
Definition: buf0block_hint.cc:29
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:75
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:417
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:191
mode
Definition: file_handle.h:59
std::map< std::string, Pipeline_member_stats > Flow_control_module_info
Data type that holds all members stats.
Definition: pipeline_stats.h:599
Flow_control_mode
Flow control modes: FCM_DISABLED flow control disabled FCM_QUOTA introduces a delay only on transacti...
Definition: pipeline_stats.h:40
@ FCM_DISABLED
Definition: pipeline_stats.h:40
@ FCM_QUOTA
Definition: pipeline_stats.h:40
An instrumented cond structure.
Definition: mysql_cond_bits.h:49
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:49