Skip to content

Commit

Permalink
BUG#26236857 - LRU_GET: ASSERTION `!IS_BUSY_MACHINE(&RETVAL->PAX)' FA…
Browse files Browse the repository at this point in the history
…ILED (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)
  • Loading branch information
tiagoportelajorge authored and ltangvald committed Apr 6, 2018
1 parent 9b4642d commit 6837d1b
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,10 +425,6 @@ static uint32_t my_id = 0; /* Unique id of this instance */
static synode_no current_message; /* Current message number */
static synode_no last_config_modification_id; /*Last configuration change proposal*/

uint32_t get_my_id(){
return my_id;
}

synode_no get_current_message()
{
return current_message;
Expand Down Expand Up @@ -3964,9 +3960,6 @@ int acceptor_learner_task(task_arg arg)
ceptor_learner_task.
*/
ep->srv = get_server(site, ep->p->from);
if(ep->rfd.x_proto > x_1_2){ /* Ignore nodes which do not send ID */
update_xcom_id(ep->p->from, (uint32_t)ep->p->refcnt); /* Refcnt is really uuid */
}
ep->p->refcnt = 1; /* Refcnt from other end is void here */
MAY_DBG(FN;
NDBG(ep->rfd.fd, d); NDBG(task_now(), f);
Expand Down Expand Up @@ -4123,9 +4116,6 @@ int reply_handler_task(task_arg arg)
add_event(string_arg("ep->s->con.fd"));
add_event(int_arg(ep->s->con.fd));
);
if(ep->s->con.x_proto > x_1_2){ /* Ignore nodes which do not send ID */
update_xcom_id(ep->reply->from, (uint32_t)ep->reply->refcnt); /* Refcnt is really uuid */
}
ep->reply->refcnt = 1; /* Refcnt from other end is void here */
if (n <= 0) {
shutdown_connection(&ep->s->con);
Expand Down Expand Up @@ -4389,6 +4379,9 @@ static void server_handle_need_snapshot(server *srv, site_def const *s, node_no
if (!synode_eq(null_synode, app_lsn) && synode_lt(app_lsn, gs->log_start)){
gs->log_start = app_lsn;
}
else if (!synode_eq(null_synode, last_config_modification_id)) {
gs->log_start = last_config_modification_id;
}

server_send_snapshot(srv, s, gs, node);
server_push_log(srv, gs->log_start, node);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ int64_t xcom_client_send_data(uint32_t size, char *data,
connection_descriptor* fd);
int xcom_client_terminate_and_exit(connection_descriptor* fd);
int xcom_client_set_cache_limit(connection_descriptor *fd, uint64_t cache_limit);
uint32_t get_my_id();

static inline char *strerr_msg(char *buf, size_t len, int nr)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,6 @@ extern int xcom_shutdown;

/* static double detected[NSERVERS]; */

static struct{
int changed;
uint32_t id[NSERVERS];
}id_tracker;

void update_xcom_id(node_no node, uint32_t id){
if(node < NSERVERS && id_tracker.id[node] != id){
id_tracker.changed = 1;
id_tracker.id[node] = id;
}
}

static int xcom_id_changed(){
return id_tracker.changed;
}

static void reset_id_changed(){
id_tracker.changed = 0;
}

/* See if node has been suspiciously still for some time */
int may_be_dead(detector_state const ds, node_no i, double seconds)
{
Expand Down Expand Up @@ -322,10 +302,8 @@ int detector_task(task_arg arg MY_ATTRIBUTE((unused)))
DBGOHK(FN; NDBG(iamtheleader(x_site), d); NDBG(enough_live_nodes(x_site), d); );
/* Send xcom message if node has changed state */
DBGOHK(FN; NDBG(ep->notify,d));
if ((xcom_id_changed() || ep->notify) &&
enough_live_nodes(x_site) && iamtheleader(x_site)) {
if (ep->notify && iamtheleader(x_site) && enough_live_nodes(x_site)) {
ep->notify = 0;
reset_id_changed();
send_my_view(x_site);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ void note_detected(struct site_def const *site, node_no node);
int may_be_dead(detector_state const ds, node_no i, double seconds);
void init_detector(detector_state ds);
void invalidate_detector_sites(struct site_def *site);
void update_xcom_id(node_no node, uint32_t id);

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ enum xcom_proto {
x_unknown_proto=0,
x_1_0=1,
x_1_1=2,
x_1_2=3,
x_1_3=4
x_1_2=3
};

typedef enum xcom_proto xcom_proto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#include "xcom_ssl_transport.h"
#endif

#define MY_XCOM_PROTO x_1_3
#define MY_XCOM_PROTO x_1_2

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

int serialize_msg(pax_msg *p, xcom_proto x_proto, uint32_t *buflen, char **buf)
{
int retval = 0;

*buflen = 0;
*buf = 0;

if(old_proto_knows(x_proto, p->op)){
/* We want to send the internal xcom ID instead of the reference count,
so we need to save and restore the count */
int save = p->refcnt;
p->refcnt = (int) get_my_id();
retval = serialize((void * )p, x_proto, buflen, (xdrproc_t)xdr_pax_msg, buf);
p->refcnt = save;
}
return retval;
return old_proto_knows(x_proto, p->op) &&
serialize((void *)p, x_proto, buflen, (xdrproc_t)xdr_pax_msg, buf);
}

int deserialize_msg(pax_msg *p, xcom_proto x_proto, char *buf, uint32_t buflen)
Expand Down Expand Up @@ -2162,7 +2153,6 @@ bool_t xdr_node_list_1_1(XDR *xdrs, node_list_1_1 *objp)
sizeof (node_address), (xdrproc_t) xdr_node_address_with_1_0);
case x_1_1:
case x_1_2:
case x_1_3:
return xdr_array (xdrs, (char **)&objp->node_list_val, (u_int *) &objp->node_list_len, NSERVERS,
sizeof (node_address), (xdrproc_t) xdr_node_address);
default:
Expand Down Expand Up @@ -2195,7 +2185,6 @@ bool_t xdr_pax_msg(XDR *xdrs, pax_msg *objp)
objp->delivered_msg = get_delivered_msg(); /* Use our own minimum */
return TRUE;
case x_1_2:
case x_1_3:
return xdr_pax_msg_1_2(xdrs, objp);
default:
return FALSE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ enum xcom_proto {
x_unknown_proto = 0,
x_1_0 = 1,
x_1_1 = 2,
x_1_2 = 3,
x_1_3 = 4,
x_1_2 = 3
};
typedef enum xcom_proto xcom_proto;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,6 @@ const char *xcom_proto_to_str(xcom_proto x)
return "x_1_1";
case x_1_2:
return "x_1_2";
case x_1_3:
return "x_1_3";
default:
return "???";
}
Expand Down

0 comments on commit 6837d1b

Please sign in to comment.