On Mon, Oct 9, 2017 at 3:19 AM Harald Barth <h...@kth.se> wrote: > > Have I got this right? > > 1. Does write_dump(context, s, database, current_version) always write > a comptele dump no matter the value of current_version? > > 2. Does write_dump(context, s, database, current_version) only use > current_version to set the version of the dump? > > 3. I's named "send_complete", but what does it need the _two_ version > numbers for? > send_complete (context, s, database, current_version, oldest_version) > What does it use "oldest_version" for? > > > /* > * If the current dump has an appropriate version, then we can > * break out of the loop and send the file below. > */ > > if (ret == 0 && vno != 0 && st.st_mtime > initial_log_tstamp && > vno >= oldest_version && vno <= current_version) > break; > > It would be nice to get a better explanation what this is supposed to > do. I don't get it from the comment.
I'll see about updating the commentary. The oldest version is the oldest I the iprop log, so if the dump is older then it can't help the slave to send it that dump and we must dump again. This is here to avoid a pathological case where we'll be sending full dumps to a bunch of slaves and we end up re-dumping the HDB once per-slave -- or where we don't re-dump and end up in a send complete loop. > >