In both places where this is used a broadcast to all active nodes should be used instead. In particular, traverses of volatile databases will not find records that have been updated on non-LMASTER nodes. CTDB_BROADCAST_VNNMAP should simply be changed to CTDB_BROADCAST_ACTIVE and its implementation should be changed accordingly.
Created attachment 14286 [details] Patch for 4.7
Created attachment 14287 [details] Patch for v4.8
Hi Karolin, This is ready for v4.7 and v4.8.
(In reply to Amitay Isaacs from comment #3) Pushed to autobuild-v4-[8,7]-test.
Patch for 4.7 seems to be incomplete, breaks the build: ../source3/smbd/notifyd/notifyd.c: In function ‘notifyd_broadcast_reclog’: ../source3/smbd/notifyd/notifyd.c:1001:15: error: ‘CTDB_BROADCAST_VNNMAP’ undeclared (first use in this function) ctdbd_conn, CTDB_BROADCAST_VNNMAP, ^ ../source3/smbd/notifyd/notifyd.c:1001:15: note: each undeclared identifier is reported only once for each function it appears in Waf: Leaving directory `/memdisk/kseeger/a47/b661372/samba-ctdb/bin' Build failed: -> task failed (err #1): {task: cc notifyd.c
Created attachment 14307 [details] Proposed additional patch for 4.7 to fix the build
Hi Karolin, Sorry I missed that. I checked that there were no instances of CTDB_BROADCAST_VNNMAP in 4.8 but forgot to do that for 4.7 :-( That looks sane. The only complication is that in 4.8+ that particular instance has been changed to CTDB_BROADCAST_CONNECTED. Your change is logically consistent and is more conservative, so I'm going to give it a +1. That change from CTDB_BROADCAST_VNNMAP -> CTDB_BROADCAST_CONNECTED doesn't appear to have been considered a serious enough bug fix to need backporting, so we should be OK. Amitay is on CC: for this defect and I'll also add Volker to see if either of them disagree.
Karolin, reassigning to you so you can move this along if you want to. I'm going to bed. :-)
(In reply to Karolin Seeger from comment #6) Pushed to autobuild-v4-7-test.
Pushed to both branches. Closing out bug report. Thanks!