| 261 | // --------------------------------------------------------------------------- |
| 262 | |
| 263 | PJ::Status DataWriter::beginRow(TopicId topic_id, Timestamp t) { |
| 264 | auto* storage = impl_->engine.getTopicStorage(topic_id); |
| 265 | if (storage == nullptr) { |
| 266 | return PJ::unexpected(fmt::format("Topic {} not found", topic_id)); |
| 267 | } |
| 268 | auto& builder = getOrCreateBuilder(topic_id); |
| 269 | // Out-of-order timestamps are accepted (multi-publisher topics interleave |
| 270 | // regressing stamps); the builder sorts rows at seal. |
| 271 | builder.beginRow(t); |
| 272 | return PJ::okStatus(); |
| 273 | } |
| 274 | |
| 275 | PJ::Status DataWriter::finishRow(PJ::TopicId topic_id) { |
| 276 | auto it = impl_->builders.find(topic_id); |
no test coverage detected