TestPGLog: not worth maintaining tests of assert behavior

Signed-off-by: Samuel Just <sam.just@inktank.com>
TestPGLog: ignore merge_old_entry return value

No callers use the merge_old_entry return value.  _merge_divergent_entries
won't have one.

Signed-off-by: Samuel Just <sam.just@inktank.com>
TestPGLog:rewind_divergent_log: set prior_version for delete

Signed-off-by: Samuel Just <sam.just@inktank.com>
TestPGLog::merge_old_entry: we no longer use merge_old_entry this way

This needs to be replaced with an equivalent test of
_merge_object_divergent_entries.

Signed-off-by: Samuel Just <sam.just@inktank.com>
TestPGLog::merge_old_entry: ne.version cannot be oe.version

Otherwise, it would not be divergent!

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG,PGLog: replace _merge_old_entry with _merge_object_divergent_entries

The _merge_old_entry structure had trouble distinguishing between the
following cases:

missing: foo, 1,1
merge_old_entry modify 1,1 0,0
merge_old_entry modify 1,2 1,1

and
merge_old_entry modify 1,2 1,1

In the first case, we should end up with foo removed from missing
at the end.  In the second, we need foo added to missing at 1,1.
It's far simpler to present all of the divergent entries for a single
object at once.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PG.h:PGLogEntryHandler: remove silly cant_rollback logic

Also, we now call rollback in a reverse order, so there is no
need to reverse the entries again.

Signed-off-by: Samuel Just <sam.just@inktank.com>
PGLog::proc_replica_log: _merge_divergent_entries based on truncated olog

We can't merge using the primary's log since we haven't decided whether
to send them a complete log yet.  Thus, merge based on the truncated olog
rather than the primary's log.  This is a consequence of the division
between trimming divergent entries in peering/unfound search and sending
a complete log to actual members of the actingbackfill set in activate().
_merge_divergent_entries on the truncated log and add_next_event() on the
newer entries result in the same missing/log regardless of the order in
which they are performed.

Signed-off-by: Samuel Just <sam.just@inktank.com>
TestPGLog::proc_replica_log: add prior_version to some entries

Otherwise, the test logs are invalid.

Signed-off-by: Samuel Just <sam.just@inktank.com>
TestPGLog::proc_replica_log: adjust to corrected proc_replica_log behavior

Signed-off-by: Samuel Just <sam.just@inktank.com>
TestPGLog::proc_replica_log: adjust wonky test

This test didn't quite make sense since the divergent entry
cannot be from a newer epoch.  It also didn't quite match the
diagram.

Signed-off-by: Samuel Just <sam.just@inktank.com>
TestPGLog: tests for proc_replica_log/merge_log equivalence

We need the merge_log and proc_replica_log paths to result in the
same missing set.  This patch adds some machinery for specifying
a log merge scenario and comparing both paths to the same correct
result.  This machinery also makes it a bit easier to read and add
new tests.

Signed-off-by: Samuel Just <sam.just@inktank.com>