diff options
author | Paul Ingram <pingram@nicira.com> | 2013-09-13 18:52:54 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2013-09-16 10:55:16 -0700 |
commit | 1ff1065c32df20a751c3d33cf2f67b798c5cf119 (patch) | |
tree | 1e6f4d2ffb616f5ad6264b8ce8ba84a38cc745ca /ovsdb/file.c | |
parent | 2958f35b7e1b2d468f6a908121d80e07c15ba22b (diff) | |
download | openvswitch-1ff1065c32df20a751c3d33cf2f67b798c5cf119.tar.gz |
ovsdb: write commit timestamps to millisecond resolution.
This is expected to make system debugging easier.
This raises two compatibility issues:
1. When a new ovsdb-tool reads an old database, it will multiply by 1000 any
timestamp it reads which is less than 1<<31. Since this date corresponds to
Jan 16 1970 this is unlikely to cause a problem.
2. When an old ovsdb-tool reads a new database, it will interpret the
millisecond timestamps as seconds and report dates in the far future; the
time of this commit is reported as the year 45672 (each second since the
epoch is interpreted as 16 minutes).
Signed-off-by: Paul Ingram <pingram@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'ovsdb/file.c')
-rw-r--r-- | ovsdb/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ovsdb/file.c b/ovsdb/file.c index 4ccf33e72..7c8ac6f29 100644 --- a/ovsdb/file.c +++ b/ovsdb/file.c @@ -768,7 +768,7 @@ ovsdb_file_txn_commit(struct json *json, const char *comment, if (comment) { json_object_put_string(json, "_comment", comment); } - json_object_put(json, "_date", json_integer_create(time_wall())); + json_object_put(json, "_date", json_integer_create(time_wall_msec())); error = ovsdb_log_write(log, json); json_destroy(json); |