Add remote_boot_uuid to Context
This lets us track which boot a message came from and finally fix the
logger relying on ServerStatistics having all the required information
needed to build up the logfile header.
Change-Id: I17fc4c5718d5d69c7a1e154afdd83b1ccb388a8f
diff --git a/aos/events/logging/log_reader.cc b/aos/events/logging/log_reader.cc
index 07b423f..098b78c 100644
--- a/aos/events/logging/log_reader.cc
+++ b/aos/events/logging/log_reader.cc
@@ -315,7 +315,8 @@
for (size_t i = 1; i < filtered_parts.size(); ++i) {
CHECK_EQ(filtered_parts[i].source_boot_uuid,
filtered_parts[0].source_boot_uuid)
- << ": Found parts from different boots "
+ << ": Found parts from different boots for node "
+ << node->name()->string_view() << " "
<< LogFileVectorToString(log_files_);
}
if (!filtered_parts[0].source_boot_uuid.empty()) {
@@ -1125,7 +1126,12 @@
timestamped_message.data.message().data()->Data(),
timestamped_message.data.message().data()->size(),
timestamped_message.monotonic_remote_time,
- timestamped_message.realtime_remote_time, remote_queue_index);
+ timestamped_message.realtime_remote_time, remote_queue_index,
+ (channel_source_state_[timestamped_message.channel_index] != nullptr
+ ? CHECK_NOTNULL(
+ channel_source_state_[timestamped_message.channel_index])
+ ->event_loop_->boot_uuid()
+ : event_loop_->boot_uuid()));
if (!sent) return false;
if (queue_index_map_[timestamped_message.channel_index]) {