Fix pwr lease expiry during pwr creation
The transition to not-alive can occur between registering the lease and making the proxy writer visible in the GUID hash table, so handling lease expiry for proxy writer must not depend on it being visible there. Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
1ed7a65b4f
commit
0f527135fc
3 changed files with 1 additions and 16 deletions
|
@ -676,7 +676,6 @@ void update_proxy_writer (struct proxy_writer *pwr, seqno_t seq, struct addrset
|
||||||
|
|
||||||
void proxy_writer_set_alive_may_unlock (struct proxy_writer *pwr, bool notify);
|
void proxy_writer_set_alive_may_unlock (struct proxy_writer *pwr, bool notify);
|
||||||
int proxy_writer_set_notalive (struct proxy_writer *pwr, bool notify);
|
int proxy_writer_set_notalive (struct proxy_writer *pwr, bool notify);
|
||||||
void proxy_writer_set_notalive_guid (struct q_globals *gv, const struct ddsi_guid *pwrguid, bool notify);
|
|
||||||
|
|
||||||
int new_proxy_group (const struct ddsi_guid *guid, const char *name, const struct dds_qos *xqos, nn_wctime_t timestamp);
|
int new_proxy_group (const struct ddsi_guid *guid, const char *name, const struct dds_qos *xqos, nn_wctime_t timestamp);
|
||||||
|
|
||||||
|
|
|
@ -4510,20 +4510,6 @@ int proxy_writer_set_notalive (struct proxy_writer *pwr, bool notify)
|
||||||
return DDS_RETCODE_OK;
|
return DDS_RETCODE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void proxy_writer_set_notalive_guid (struct q_globals *gv, const struct ddsi_guid *pwrguid, bool notify)
|
|
||||||
{
|
|
||||||
struct proxy_writer *pwr;
|
|
||||||
if ((pwr = entidx_lookup_proxy_writer_guid (gv->entity_index, pwrguid)) == NULL)
|
|
||||||
GVLOGDISC (" "PGUIDFMT"?\n", PGUID (*pwrguid));
|
|
||||||
else
|
|
||||||
{
|
|
||||||
GVLOGDISC ("proxy_writer_set_notalive_guid ("PGUIDFMT")", PGUID (*pwrguid));
|
|
||||||
if (proxy_writer_set_notalive (pwr, notify) == DDS_RETCODE_PRECONDITION_NOT_MET)
|
|
||||||
GVLOGDISC (" pwr was not alive");
|
|
||||||
GVLOGDISC ("\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* PROXY-READER ----------------------------------------------------- */
|
/* PROXY-READER ----------------------------------------------------- */
|
||||||
|
|
||||||
int new_proxy_reader (struct q_globals *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const nn_plist_t *plist, nn_wctime_t timestamp, seqno_t seq
|
int new_proxy_reader (struct q_globals *gv, const struct ddsi_guid *ppguid, const struct ddsi_guid *guid, struct addrset *as, const nn_plist_t *plist, nn_wctime_t timestamp, seqno_t seq
|
||||||
|
|
|
@ -281,7 +281,7 @@ int64_t check_and_handle_lease_expiration (struct q_globals *gv, nn_etime_t tnow
|
||||||
delete_proxy_participant_by_guid (gv, &g, now(), 1);
|
delete_proxy_participant_by_guid (gv, &g, now(), 1);
|
||||||
break;
|
break;
|
||||||
case EK_PROXY_WRITER:
|
case EK_PROXY_WRITER:
|
||||||
proxy_writer_set_notalive_guid (gv, &g, true);
|
proxy_writer_set_notalive ((struct proxy_writer *) l->entity, true);
|
||||||
break;
|
break;
|
||||||
case EK_PARTICIPANT:
|
case EK_PARTICIPANT:
|
||||||
case EK_READER:
|
case EK_READER:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue