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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Răzvan Crainea-3
  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 <[hidden email]>
  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 <[hidden email]>
  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

_______________________________________________
Devel mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel