On Fri, Sep 13, 2013 at 06:52:53PM -0700, Paul Ingram wrote:
> 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 <[email protected]>
This includes a couple of VLOG_INFOs that are apparently debugging
strays. I removed them:
diff --git a/ovsdb/file.c b/ovsdb/file.c
index 87cbce6..4ccf33e 100644
--- a/ovsdb/file.c
+++ b/ovsdb/file.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, 2010, 2011, 2012 Nicira, Inc.
+/* Copyright (c) 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -534,7 +534,6 @@ ovsdb_file_create(struct ovsdb *db, struct ovsdb_log *log,
file->next_compact = file->last_compact + COMPACT_MIN_MSEC;
file->n_transactions = n_transactions;
ovsdb_add_replica(db, &file->replica);
- VLOG_INFO("%s: last_compact %llu", file->file_name, file->last_compact);
*filep = file;
return NULL;
@@ -584,10 +583,6 @@ ovsdb_file_commit(struct ovsdb_replica *replica,
* compacted (or at least COMPACT_RETRY_MSEC ms since the last time we
* tried), and if there are at least 100 transactions in the database, and
* if the database is at least 10 MB, then compact the database. */
- {
- long long int now = time_msec();
- VLOG_INFO("%s: time_msec %llu %s next_compact %llu n_transactions %llu,
size %llu", file->file_name, now, (now >= file->next_compact) ? ">=" : "<",
file->next_compact, file->n_transactions, ovsdb_log_get_offset(file->log));
- }
if (time_msec() >= file->next_compact
&& file->n_transactions >= 100
&& ovsdb_log_get_offset(file->log) >= 10 * 1024 * 1024)
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev