AckContainer stores received acks internally and tell the caller the ack's position when a transaction is fully acknowledged, so it can wake up the waiting transactions.
More...
#include <semisync_source.h>
AckContainer stores received acks internally and tell the caller the ack's position when a transaction is fully acknowledged, so it can wake up the waiting transactions.
◆ AckContainer() [1/2]
AckContainer::AckContainer |
( |
| ) |
|
|
inline |
◆ ~AckContainer()
AckContainer::~AckContainer |
( |
| ) |
|
|
inline |
◆ AckContainer() [2/2]
◆ clear()
void AckContainer::clear |
( |
| ) |
|
|
inline |
Clear the content of the ack array.
◆ full()
bool AckContainer::full |
( |
| ) |
|
|
inlineprivate |
◆ insert() [1/2]
◆ insert() [2/2]
const AckInfo * AckContainer::insert |
( |
int |
server_id, |
|
|
const char * |
log_file_name, |
|
|
my_off_t |
log_file_pos |
|
) |
| |
Insert an ack's information into the container and report the minimum ack to semisync master if it is full.
- Parameters
-
[in] | server_id | slave server_id of the ack |
[in] | log_file_name | binlog file name of the ack |
[in] | log_file_pos | binlog file position of the ack |
- Returns
- Pointer of an ack if the ack should be reported to semisync master. Otherwise, NULL is returned.
◆ minAck()
AckInfo * AckContainer::minAck |
( |
const char * |
log_file_name, |
|
|
my_off_t |
log_file_pos |
|
) |
| |
|
inlineprivate |
Find the minimum ack which is smaller than given position.
When more than one slots are minimum acks, it returns the one has smallest index.
- Parameters
-
[in] | log_file_name | binlog file name |
[in] | log_file_pos | binlog file position |
- Returns
- NULL if no ack is smaller than given position, otherwise return its pointer.
◆ operator=()
◆ remove_all()
void AckContainer::remove_all |
( |
const char * |
log_file_name, |
|
|
my_off_t |
log_file_pos |
|
) |
| |
|
inlineprivate |
Remove all acks which equal to the given position.
- Parameters
-
[in] | log_file_name | binlog name of the ack that should be removed |
[in] | log_file_pos | binlog position of the ack that should removed |
◆ resize()
int AckContainer::resize |
( |
unsigned int |
size, |
|
|
const AckInfo ** |
ackinfo |
|
) |
| |
Adjust capacity for the container and report the ack to semisync master, if it is full.
- Parameters
-
[in] | size | size of the container. |
| ackinfo | Acknowledgement information |
- Returns
- 0 if succeeds, otherwise fails.
◆ size()
unsigned int AckContainer::size |
( |
| ) |
|
|
inlineprivate |
◆ updateIfExist()
unsigned int AckContainer::updateIfExist |
( |
int |
server_id, |
|
|
const char * |
log_file_name, |
|
|
my_off_t |
log_file_pos |
|
) |
| |
|
inlineprivate |
Update a slave's ack into the container if another ack of the slave is already in it.
- Parameters
-
[in] | server_id | server_id of the ack |
[in] | log_file_name | binlog file name of the ack |
[in] | log_file_pos | binlog file position of the ack |
- Returns
- index of the slot that is updated. if it equals to the size of container, then no slot is updated.
◆ m_ack_array
◆ m_empty_slot
unsigned int AckContainer::m_empty_slot |
|
private |
◆ m_greatest_ack
AckInfo AckContainer::m_greatest_ack |
|
private |
◆ m_size
unsigned int AckContainer::m_size |
|
private |
The documentation for this class was generated from the following files: