Kill QueueSpan
As we move to writing large blocks, QueueSpan is only used for the log
file header, and was just calling CopyMessage. Update the callers.
Change-Id: I50c79f653cda2c5bf9d401c52a59b5a1698285c1
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/aos/events/logging/logfile_utils.cc b/aos/events/logging/logfile_utils.cc
index ab56356..90220c8 100644
--- a/aos/events/logging/logfile_utils.cc
+++ b/aos/events/logging/logfile_utils.cc
@@ -129,27 +129,12 @@
return *this;
}
-void DetachedBufferWriter::QueueSpan(absl::Span<const uint8_t> span) {
+void DetachedBufferWriter::CopyMessage(DataEncoder::Copier *coppier,
+ aos::monotonic_clock::time_point now) {
if (ran_out_of_space_) {
// We don't want any later data to be written after space becomes
// available, so refuse to write anything more once we've dropped data
// because we ran out of space.
- VLOG(1) << "Ignoring span: " << span.size();
- return;
- }
-
- if (!encoder_->HasSpace(span.size())) {
- Flush();
- CHECK(encoder_->HasSpace(span.size()));
- }
- DataEncoder::SpanCopier coppier(span);
- encoder_->Encode(&coppier);
- FlushAtThreshold(aos::monotonic_clock::now());
-}
-
-void DetachedBufferWriter::CopyMessage(DataEncoder::Copier *coppier,
- aos::monotonic_clock::time_point now) {
- if (ran_out_of_space_) {
return;
}