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