Fix multiple snapshots present after journal removal 80/82380/8
authorTomas Cere <tomas.cere@pantheon.tech>
Mon, 3 Jun 2019 13:02:08 +0000 (15:02 +0200)
committerRobert Varga <nite@hq.sk>
Thu, 4 Jul 2019 15:02:51 +0000 (15:02 +0000)
After journal removal the sequence number starts counting from 0
once again. Therefore we can have multiple snapshots present and
snapshots with higher sequence number always take priority for loading
even when a newer snapshot is present.

Change this up in 2 ways:
1. disregard sequence number while deleting snapshots(delete all
snapshots with an older timestamp)
2. while loading snapshots prioritize timestamp rather than seqNr.

Also simplify LocalSnapshotStore.compare().

Change-Id: I205ea0ddf48d73b0a09297a1ce4e9fd514531993
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>

No differences found