Skip to content

Commit 6837d1b

Browse files
tiagoportelajorgeltangvald
authored andcommitted
BUG#26236857 - LRU_GET: ASSERTION `!IS_BUSY_MACHINE(&RETVAL->PAX)' FAILED (Post-Fix)
This patch maintains the removal of the assertion code, but reverts the part of the patch that changes they way log_start is sent to other members and how new incarnations nodes are seen by the system within XCom. (cherry picked from commit 00d87720eecd2a411b7930574fc3b5c05296e651)
1 parent 9b4642d commit 6837d1b

File tree

8 files changed

+9
-55
lines changed

8 files changed

+9
-55
lines changed

rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -425,10 +425,6 @@ static uint32_t my_id = 0; /* Unique id of this instance */
425425
static synode_no current_message; /* Current message number */
426426
static synode_no last_config_modification_id; /*Last configuration change proposal*/
427427

428-
uint32_t get_my_id(){
429-
return my_id;
430-
}
431-
432428
synode_no get_current_message()
433429
{
434430
return current_message;
@@ -3964,9 +3960,6 @@ int acceptor_learner_task(task_arg arg)
39643960
ceptor_learner_task.
39653961
*/
39663962
ep->srv = get_server(site, ep->p->from);
3967-
if(ep->rfd.x_proto > x_1_2){ /* Ignore nodes which do not send ID */
3968-
update_xcom_id(ep->p->from, (uint32_t)ep->p->refcnt); /* Refcnt is really uuid */
3969-
}
39703963
ep->p->refcnt = 1; /* Refcnt from other end is void here */
39713964
MAY_DBG(FN;
39723965
NDBG(ep->rfd.fd, d); NDBG(task_now(), f);
@@ -4123,9 +4116,6 @@ int reply_handler_task(task_arg arg)
41234116
add_event(string_arg("ep->s->con.fd"));
41244117
add_event(int_arg(ep->s->con.fd));
41254118
);
4126-
if(ep->s->con.x_proto > x_1_2){ /* Ignore nodes which do not send ID */
4127-
update_xcom_id(ep->reply->from, (uint32_t)ep->reply->refcnt); /* Refcnt is really uuid */
4128-
}
41294119
ep->reply->refcnt = 1; /* Refcnt from other end is void here */
41304120
if (n <= 0) {
41314121
shutdown_connection(&ep->s->con);
@@ -4389,6 +4379,9 @@ static void server_handle_need_snapshot(server *srv, site_def const *s, node_no
43894379
if (!synode_eq(null_synode, app_lsn) && synode_lt(app_lsn, gs->log_start)){
43904380
gs->log_start = app_lsn;
43914381
}
4382+
else if (!synode_eq(null_synode, last_config_modification_id)) {
4383+
gs->log_start = last_config_modification_id;
4384+
}
43924385

43934386
server_send_snapshot(srv, s, gs, node);
43944387
server_push_log(srv, gs->log_start, node);

rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_base.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ int64_t xcom_client_send_data(uint32_t size, char *data,
219219
connection_descriptor* fd);
220220
int xcom_client_terminate_and_exit(connection_descriptor* fd);
221221
int xcom_client_set_cache_limit(connection_descriptor *fd, uint64_t cache_limit);
222-
uint32_t get_my_id();
223222

224223
static inline char *strerr_msg(char *buf, size_t len, int nr)
225224
{

rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_detector.c

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,6 @@ extern int xcom_shutdown;
4040

4141
/* static double detected[NSERVERS]; */
4242

43-
static struct{
44-
int changed;
45-
uint32_t id[NSERVERS];
46-
}id_tracker;
47-
48-
void update_xcom_id(node_no node, uint32_t id){
49-
if(node < NSERVERS && id_tracker.id[node] != id){
50-
id_tracker.changed = 1;
51-
id_tracker.id[node] = id;
52-
}
53-
}
54-
55-
static int xcom_id_changed(){
56-
return id_tracker.changed;
57-
}
58-
59-
static void reset_id_changed(){
60-
id_tracker.changed = 0;
61-
}
62-
6343
/* See if node has been suspiciously still for some time */
6444
int may_be_dead(detector_state const ds, node_no i, double seconds)
6545
{
@@ -322,10 +302,8 @@ int detector_task(task_arg arg MY_ATTRIBUTE((unused)))
322302
DBGOHK(FN; NDBG(iamtheleader(x_site), d); NDBG(enough_live_nodes(x_site), d); );
323303
/* Send xcom message if node has changed state */
324304
DBGOHK(FN; NDBG(ep->notify,d));
325-
if ((xcom_id_changed() || ep->notify) &&
326-
enough_live_nodes(x_site) && iamtheleader(x_site)) {
305+
if (ep->notify && iamtheleader(x_site) && enough_live_nodes(x_site)) {
327306
ep->notify = 0;
328-
reset_id_changed();
329307
send_my_view(x_site);
330308
}
331309
}

rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_detector.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ void note_detected(struct site_def const *site, node_no node);
2929
int may_be_dead(detector_state const ds, node_no i, double seconds);
3030
void init_detector(detector_state ds);
3131
void invalidate_detector_sites(struct site_def *site);
32-
void update_xcom_id(node_no node, uint32_t id);
3332

3433
#ifdef __cplusplus
3534
}

rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_proto_enum.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ enum xcom_proto {
1717
x_unknown_proto=0,
1818
x_1_0=1,
1919
x_1_1=2,
20-
x_1_2=3,
21-
x_1_3=4
20+
x_1_2=3
2221
};
2322

2423
typedef enum xcom_proto xcom_proto;

rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_transport.c

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
#include "xcom_ssl_transport.h"
5555
#endif
5656

57-
#define MY_XCOM_PROTO x_1_3
57+
#define MY_XCOM_PROTO x_1_2
5858

5959
xcom_proto const my_min_xcom_version = x_1_0; /* The minimum protocol version I am able to understand */
6060
xcom_proto const my_xcom_version = MY_XCOM_PROTO; /* The maximun protocol version I am able to understand */
@@ -658,20 +658,11 @@ static inline int old_proto_knows(xcom_proto x_proto MY_ATTRIBUTE((unused)),
658658

659659
int serialize_msg(pax_msg *p, xcom_proto x_proto, uint32_t *buflen, char **buf)
660660
{
661-
int retval = 0;
662-
663661
*buflen = 0;
664662
*buf = 0;
665663

666-
if(old_proto_knows(x_proto, p->op)){
667-
/* We want to send the internal xcom ID instead of the reference count,
668-
so we need to save and restore the count */
669-
int save = p->refcnt;
670-
p->refcnt = (int) get_my_id();
671-
retval = serialize((void * )p, x_proto, buflen, (xdrproc_t)xdr_pax_msg, buf);
672-
p->refcnt = save;
673-
}
674-
return retval;
664+
return old_proto_knows(x_proto, p->op) &&
665+
serialize((void *)p, x_proto, buflen, (xdrproc_t)xdr_pax_msg, buf);
675666
}
676667

677668
int deserialize_msg(pax_msg *p, xcom_proto x_proto, char *buf, uint32_t buflen)
@@ -2162,7 +2153,6 @@ bool_t xdr_node_list_1_1(XDR *xdrs, node_list_1_1 *objp)
21622153
sizeof (node_address), (xdrproc_t) xdr_node_address_with_1_0);
21632154
case x_1_1:
21642155
case x_1_2:
2165-
case x_1_3:
21662156
return xdr_array (xdrs, (char **)&objp->node_list_val, (u_int *) &objp->node_list_len, NSERVERS,
21672157
sizeof (node_address), (xdrproc_t) xdr_node_address);
21682158
default:
@@ -2195,7 +2185,6 @@ bool_t xdr_pax_msg(XDR *xdrs, pax_msg *objp)
21952185
objp->delivered_msg = get_delivered_msg(); /* Use our own minimum */
21962186
return TRUE;
21972187
case x_1_2:
2198-
case x_1_3:
21992188
return xdr_pax_msg_1_2(xdrs, objp);
22002189
default:
22012190
return FALSE;

rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_vp.h.gen

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ enum xcom_proto {
3434
x_unknown_proto = 0,
3535
x_1_0 = 1,
3636
x_1_1 = 2,
37-
x_1_2 = 3,
38-
x_1_3 = 4,
37+
x_1_2 = 3
3938
};
4039
typedef enum xcom_proto xcom_proto;
4140

rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/xcom/xcom_vp_str.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,6 @@ const char *xcom_proto_to_str(xcom_proto x)
218218
return "x_1_1";
219219
case x_1_2:
220220
return "x_1_2";
221-
case x_1_3:
222-
return "x_1_3";
223221
default:
224222
return "???";
225223
}

0 commit comments

Comments
 (0)