[OpenSIPS-Devel] [OpenSIPS/opensips] 8265c6: dialog: Fix data reload race conditions on startup

Liviu Chircu noreply at github.com
Mon Jul 29 12:06:13 EDT 2019


  Branch: refs/heads/bugfix/fix-dialog-sync-bugs
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 8265c6e4ef8f81f5b78f75f3f2315eccc9a633c3
      https://github.com/OpenSIPS/opensips/commit/8265c6e4ef8f81f5b78f75f3f2315eccc9a633c3
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2019-07-29 (Mon, 29 Jul 2019)

  Changed paths:
    M modules/dialog/dlg_db_handler.c
    M modules/dialog/dlg_hash.c
    M modules/dialog/dlg_hash.h
    M modules/dialog/dlg_replication.c

  Log Message:
  -----------
  dialog: Fix data reload race conditions on startup

Since loading the data on child_init(), the load_dialog_info_from_db()
routines and rcv_cluster_event() routines could run in parallel, without
any synchronization on the dialog table, which could lead to duplicate
dialogs in the hash.


  Commit: a15aa0b43b4eca5b37f56cbd53819b0f39a815c8
      https://github.com/OpenSIPS/opensips/commit/a15aa0b43b4eca5b37f56cbd53819b0f39a815c8
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2019-07-29 (Mon, 29 Jul 2019)

  Changed paths:
    M modules/dialog/dlg_db_handler.c
    M modules/dialog/dlg_handlers.c
    M modules/dialog/dlg_hash.h
    M modules/dialog/dlg_replication.c
    M modules/dialog/dlg_req_within.h

  Log Message:
  -----------
  dialog: Decrement dialog stats during post-sync cleanup

After a sync completes, it proceeds to clean up all dialogs loaded from
DB which did not match the data received via sync.  However, make sure
to also decrement the 'active' / 'early' dialog stats on each delete!


Compare: https://github.com/OpenSIPS/opensips/compare/b8bde2f014e5...a15aa0b43b4e



More information about the Devel mailing list