On 2017-10-05 11:52:59, Harald Barth wrote: > > By looking at the code of send_diffs (ipropd_master.c:666) it looks to > me that there somewhere at the beginning of that long function, before > plowing through the log on the master, there should be something like > > if (current_version == 0 || s->version == 0){ > > (...) > > return send_complete (...); > } > > to catch these special cases. What else should the master do > than to send everyting in these cases?I don't see any > other code which clearly handles when current_version == 0 > is encountered or if the slave reported that it was at version 0 > (tmp == 0 in process_msg) which then sets s->version = 0. >
There used to be code early in send_diffs() which called send_complete() if the slave was at version 0, but it was removed in commit 539ba5fb8751d7c8741c89e99645775f131ba4fe. Checking out heimdal-1-5-branch will show the following snippet: === 475 /* if slave is a fresh client, starting over */ 476 if (s->version == 0) { 477 krb5_warnx(context, "sending complete log to fresh slave %s", 478 s->name); 479 return send_complete (context, s, database, current_version); 480 } === >From what I can tell iprop has no way to differentiate between "I have no database, therefore I consider myself at version 0" and "I have a database, in sync with version 0". Unless I am missing something this would mean that if something like the code above was added back, truncating the log to version 0 would make all slaves fetch the complete database over and over again until a modification bumps the version at the master. Regards, Patrik Lundin