ovsdb: Use DB load time, not on-disk commit times, for compaction.
authorPaul Ingram <pingram@nicira.com>
Sat, 14 Sep 2013 01:52:53 +0000 (18:52 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 17 Sep 2013 20:56:14 +0000 (13:56 -0700)
commit75dbe9e934e625d8adaab8222457240331a60546
treec69f26b6a2e9d45a69d488f508d1ddedadd3c0ed
parent45739ed1153f99471ca4c68b1a9576dcfdb6e497
ovsdb: Use DB load time, not on-disk commit times, for compaction.

The ovsdb-server compaction timing logic is written assuming monotonic
time at milliscond resolution but it calculated the next compaction time
based on the oldest commit in the database. This was a problem because
commit timestamps are written in wall-clock time to second resolution.

This commit calculates the next compaction time based on the time when
the database was first loaded or the last compaction was done, both in
monotonic time at millisecond resolution.

Signed-off-by: Paul Ingram <pingram@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovsdb/file.c