[OpenSIPS-Devel] [OpenSIPS/opensips] 340096: mid_registrar, usrloc: replicate AoR with populate...
Denys Pozniak
noreply at github.com
Tue Jun 23 11:59:36 UTC 2026
Branch: refs/heads/master
Home: https://github.com/OpenSIPS/opensips
Commit: 3400961523f4bf5108941806e840bfbc92d3ee0c
https://github.com/OpenSIPS/opensips/commit/3400961523f4bf5108941806e840bfbc92d3ee0c
Author: Denys Pozniak <denys.pozniak at gmail.com>
Date: 2026-06-23 (Tue, 23 Jun 2026)
Changed paths:
M modules/mid_registrar/save.c
M modules/pua_reginfo/notify.c
M modules/registrar/save.c
M modules/registrar/test/test.c
M modules/usrloc/udomain.c
M modules/usrloc/udomain.h
M modules/usrloc/ul_cluster.c
M modules/usrloc/ul_mi.c
M modules/usrloc/usrloc.h
Log Message:
-----------
mid_registrar, usrloc: replicate AoR with populated kv_storage
Fixes the race in `full-sharing-cluster` mode where peers received
REPL_URECORD_INSERT packets with an empty kv_storage. The serialization
that 343f452c1 added shipped whatever was in r->kv_storage at replicate
time, but mid_registrar's store_urecord_data() ran *after*
ul.insert_urecord() — so peers saw an empty store and later failed to
issue De-REGISTERs:
ERROR:usrloc:store_deserialize: bad JSON input or oom
ERROR:mid_registrar:unregister_record: 'from' key not found, skipping De-REGISTER
ERROR:mid_registrar:mid_reg_aor_event: failed to unregister contact
Mirror the existing ucontact pattern (ucontact_info_t.pre_replicate_cb):
extend insert_urecord() with an optional pre-replication callback that
the caller can use to attach record-level data between mem_insert and
replicate_urecord_insert. mid_registrar wires mid_reg_store_aor_data
into the throttle-AoR save path so the kv_storage is populated before
the INSERT packet is built.
Closes #3845
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/OpenSIPS/opensips/settings/notifications
More information about the Devel
mailing list