Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3156 +/- ##
==========================================
+ Coverage 78.36% 78.38% +0.01%
==========================================
Files 674 674
Lines 55376 55458 +82
Branches 728 728
==========================================
+ Hits 43398 43470 +72
- Misses 11900 11910 +10
Partials 78 78
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
As part of this investigation I noticed that some things we wait for acks and some we do not: InterfaceTopic methods WITH ack-wait:
InterfaceTopic methods WITHOUT ack-wait (fire-and-forget):
DecomInterfaceTopic - ALL methods wait for acks:
The methods that wait are where you need to know the outcome either to return data or propagate errors. The others are commands where we can infer the outcome through other telemetry (status models, etc). We could extract a helper method into Topic like so: def self.write_and_wait_for_ack(cmd_topic, ack_topic, data, timeout:)
Topic.update_topic_offsets([ack_topic])
cmd_id = Topic.write_topic(cmd_topic, data, '*', 100)
time = Time.now
while (Time.now - time) < timeout
Topic.read_topics([ack_topic]) do |_topic, _msg_id, msg_hash, _redis|
if msg_hash["id"] == cmd_id
yield msg_hash
return msg_hash
end
end
end
raise "Timeout of #{timeout}s waiting for cmd ack"
endthat could be used by InterfaceTopic and DecomInterfaceTopic but the bigger change would be to add acks to all the other methods above. Thoughts? |
|
Everything should be "optionally" acked, (but on by default). |
|
|
Please write another ticket to capture waits for other methods. |




closes #2960