omq 0.16.1 → 0.16.2
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 +25 -0
- data/lib/omq/routing/round_robin.rb +8 -0
- 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: 856ca133b440ec0812ec17c9a470ce25d69a405f0d3fdbedb04194a4ac60527e
|
|
4
|
+
data.tar.gz: 8b01aceb4098b436ad0c69f0c62930d6fafe8372bf6cbc77004cb4569936c6be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b08a46d592cc3ba300991aaab8b99cbb22c377520b10bee9a8e67537d714474707113b15e8202a3f3b5bf277d8796b8ff0670f63e6cb850721d4a18374aac2b
|
|
7
|
+
data.tar.gz: 7cb4caa364be3a387f4aaa531b4019fa075d434b2d243507892cc7ae6dbe13f0b9b2c201564f703ff4fc5ed42b27f714753ae870c4fcd9af47ab102afdcb3bf3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.16.2 — 2026-04-09
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **Work-stealing send pump fairness.** `RoundRobin#start_conn_send_pump`
|
|
8
|
+
had no fiber yield between batches. `write_batch` typically completes
|
|
9
|
+
without yielding when the kernel TCP buffer absorbs the whole batch,
|
|
10
|
+
so the first pump to wake could drain a pre-filled send queue in one
|
|
11
|
+
continuous run — starving peer pumps until the queue was empty. This
|
|
12
|
+
was visible as a flaky `push_pull_test.rb#test_0002 distributes
|
|
13
|
+
messages across multiple PULL peers` on CI, where the second peer
|
|
14
|
+
received zero messages. Added `Async::Task.current.yield` at the
|
|
15
|
+
bottom of the pump loop; effectively free when there is no other
|
|
16
|
+
work, and guarantees peers actually get a turn when the queue stays
|
|
17
|
+
non-empty.
|
|
18
|
+
|
|
19
|
+
- **`disconnect` test no longer assumes strict round-robin.** The test
|
|
20
|
+
asserted that `push.send("to ep1")` followed by `pull1.receive`
|
|
21
|
+
returns that exact message — only true with libzmq-style strict
|
|
22
|
+
per-peer round-robin, not OMQ's work-stealing. It was passing by
|
|
23
|
+
accident because the first-started pump consistently dequeued first.
|
|
24
|
+
Rewritten to only assert the actual `#disconnect` semantics: after
|
|
25
|
+
`disconnect("ep1")`, subsequent messages reach ep2 and ep1 receives
|
|
26
|
+
nothing.
|
|
27
|
+
|
|
3
28
|
## 0.16.1 — 2026-04-09
|
|
4
29
|
|
|
5
30
|
### Changed
|
|
@@ -112,6 +112,13 @@ module OMQ
|
|
|
112
112
|
# per-pump latency bounded enough that small-message multi-peer
|
|
113
113
|
# fairness still benefits.
|
|
114
114
|
#
|
|
115
|
+
# A `Task.yield` between batches ensures peer pumps actually
|
|
116
|
+
# get a turn: `write_batch` may complete without yielding when
|
|
117
|
+
# TCP buffers absorb the whole batch, so without this the first
|
|
118
|
+
# pump to wake can drain a pre-filled queue in one continuous
|
|
119
|
+
# run. The yield is effectively free when the scheduler has no
|
|
120
|
+
# other work.
|
|
121
|
+
#
|
|
115
122
|
# @param conn [Connection]
|
|
116
123
|
#
|
|
117
124
|
def start_conn_send_pump(conn)
|
|
@@ -121,6 +128,7 @@ module OMQ
|
|
|
121
128
|
drain_send_queue_capped(batch)
|
|
122
129
|
write_batch(conn, batch)
|
|
123
130
|
batch.each { |parts| @engine.emit_verbose_monitor_event(:message_sent, parts: parts) }
|
|
131
|
+
Async::Task.current.yield
|
|
124
132
|
rescue Protocol::ZMTP::Error, *CONNECTION_LOST
|
|
125
133
|
@engine.connection_lost(conn)
|
|
126
134
|
break
|
data/lib/omq/version.rb
CHANGED