Don't put reliable timestamps in the unreliable log file header field
James and I debugged a log file sorting bug which turned out to be a
logging bug. The SystemParameters timestamp file (which we can all
agree is a reliable message) had the delivery time in
oldest_unreliable_remote_monotonic_timestamps, which is only for
unreliable timestamps.
This was because reliability was being tracked for the contents channel,
not the source message. Instead, we need to do the book-keeping to
track if the source is realiable or not, and update the header
accordingly. While we don't want to see new combined timestamp logs, we
still need to support them. We don't mind if they are a bit less
efficient to log.
Change-Id: I292f5c0a64926904e13fb5d712acd523f3849cd4
Signed-off-by: Austin Schuh <austin.schuh@bluerivertech.com>
diff --git a/aos/network/timestamp_channel.cc b/aos/network/timestamp_channel.cc
index 88b6ed0..ab61051 100644
--- a/aos/network/timestamp_channel.cc
+++ b/aos/network/timestamp_channel.cc
@@ -27,6 +27,15 @@
return absl::StrCat("/aos/remote_timestamps/", remote_node);
}
+const Channel *ChannelTimestampFinder::SplitChannelForChannel(
+ const Channel *channel, const Connection *connection) {
+ const std::string split_timestamp_channel_name =
+ SplitChannelName(channel, connection);
+ return configuration::GetChannel(configuration_, split_timestamp_channel_name,
+ RemoteMessage::GetFullyQualifiedName(),
+ name_, node_, true);
+}
+
const Channel *ChannelTimestampFinder::ForChannel(
const Channel *channel, const Connection *connection) {
const std::string split_timestamp_channel_name =