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>
Mon, 16 Sep 2013 17:20:17 +0000 (10:20 -0700)
commit2958f35b7e1b2d468f6a908121d80e07c15ba22b
tree6d167496188143c32253dc5aa4c25d56a5b7fc21
parent31d738062df326aca43ff0d6ee72b457c6013b42
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