omq 0.17.7 → 0.17.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/omq/routing/round_robin.rb +9 -2
- data/lib/omq/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 684f878ff9a1731c4820ec6a6ed52393b727fa046b3d8ff74dfbb4fd50e20e48
|
|
4
|
+
data.tar.gz: f5ffad6b1c827949a3c17088536af9a7b7e3f329231767b299cb5bd5a0f73628
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ec98f8caf95091396b6a7f4e3ed01480700c4ba7fb14d3c85dc20572e6fd2cf3160f1f081f5390d79834d8b9db8271a6f8104c34400562c874fbf61c2763cfab
|
|
7
|
+
data.tar.gz: 15a546c0717ab0440aeb010bd9fca87f01f63bffe4eba91fa852b2a48bb99864994c366778114e116463c715dbab11e218256602c662d394dc6a17b5657e683f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.17.8 — 2026-04-10
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **Linger drain missed in-flight messages.** `RoundRobin#send_queues_drained?`
|
|
8
|
+
now tracks an `@in_flight` counter for messages dequeued by pump fibers but
|
|
9
|
+
not yet written. Previously, linger could tear down connections while pumps
|
|
10
|
+
still held unwritten batches, dropping messages silently.
|
|
11
|
+
|
|
3
12
|
## 0.17.7 — 2026-04-10
|
|
4
13
|
|
|
5
14
|
### Changed
|
|
@@ -20,9 +20,10 @@ module OMQ
|
|
|
20
20
|
#
|
|
21
21
|
module RoundRobin
|
|
22
22
|
# @return [Boolean] true when the shared send queue is empty
|
|
23
|
+
# and no pump fiber is mid-write with a dequeued batch.
|
|
23
24
|
#
|
|
24
25
|
def send_queues_drained?
|
|
25
|
-
@send_queue.empty?
|
|
26
|
+
@send_queue.empty? && @in_flight == 0
|
|
26
27
|
end
|
|
27
28
|
|
|
28
29
|
private
|
|
@@ -36,6 +37,7 @@ module OMQ
|
|
|
36
37
|
@send_queue = Routing.build_queue(engine.options.send_hwm, :block)
|
|
37
38
|
@direct_pipe = nil
|
|
38
39
|
@conn_send_tasks = {} # conn => send pump task
|
|
40
|
+
@in_flight = 0 # messages dequeued but not yet written
|
|
39
41
|
end
|
|
40
42
|
|
|
41
43
|
|
|
@@ -126,7 +128,12 @@ module OMQ
|
|
|
126
128
|
loop do
|
|
127
129
|
batch = [@send_queue.dequeue]
|
|
128
130
|
drain_send_queue_capped(batch)
|
|
129
|
-
|
|
131
|
+
@in_flight += batch.size
|
|
132
|
+
begin
|
|
133
|
+
write_batch(conn, batch)
|
|
134
|
+
ensure
|
|
135
|
+
@in_flight -= batch.size
|
|
136
|
+
end
|
|
130
137
|
batch.each { |parts| @engine.emit_verbose_monitor_event(:message_sent, parts: parts) }
|
|
131
138
|
Async::Task.current.yield
|
|
132
139
|
end
|
data/lib/omq/version.rb
CHANGED