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