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

Liviu Chircu noreply at github.com
Mon Jul 29 12:14:56 EDT 2019


  Branch: refs/heads/bugfix/fix-dialog-sync-bugs
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 8e9cee7db956a0321a92b6771852521f90aac696
      https://github.com/OpenSIPS/opensips/commit/8e9cee7db956a0321a92b6771852521f90aac696
  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: dfa863b9b2a9255e58be14b6ad3559406f7fdc99
      https://github.com/OpenSIPS/opensips/commit/dfa863b9b2a9255e58be14b6ad3559406f7fdc99
  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/a15aa0b43b4e...dfa863b9b2a9



More information about the Devel mailing list