• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nats-io / nats-server / 13256013660
84%

Build:
DEFAULT BRANCH: main
Ran 11 Feb 2025 05:44AM UTC
Jobs 1
Files 57
Run time 204min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Feb 2025 05:02PM UTC coverage: 85.493% (+0.04%) from 85.454%
13256013660

push

github

web-flow
[FIXED] (2.11) Clear inflight dedupe IDs on leader change (#6486)

Reverts https://github.com/nats-io/nats-server/pull/6415 and
https://github.com/nats-io/nats-server/pull/6426. If duplication would
be deferred to be done by a replica, and that replica was down for at
least 'dupe window+5s', and it would clean up the dedupe map. A message
that was meant to be duplicate could be passed as a genuine message,
resulting in stream desync.

Instead, the dedupe map should be cleared of any staged zero-sequences.
However, that was not possible before as a new leader would not always
be fully up-to-date when it starts responding to new write requests,
which could result in duplicate messages as well.

However, relying on the 'Leader Completeness Property' implemented here:
https://github.com/nats-io/nats-server/pull/6485, we can confidently
clear the dedupe map now of any staged zero-sequences (knowing they were
not proposed). Ensuring both there's no desync, and a failed proposal
for a message would not block subsequent messages with the same dedupe
ID.

Have left the commits as separate, to ease reviewing.

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>

69072 of 80793 relevant lines covered (85.49%)

901819.63 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
84.5
-0.07% src/github.com/nats-io/nats-server/server/monitor.go
2
97.62
-2.38% src/github.com/nats-io/nats-server/server/jetstream_versioning.go
2
84.18
0.06% src/github.com/nats-io/nats-server/server/memstore.go
2
63.16
-10.53% src/github.com/nats-io/nats-server/server/jetstream_events.go
3
83.8
0.78% src/github.com/nats-io/nats-server/server/filestore.go
3
80.85
0.07% src/github.com/nats-io/nats-server/server/opts.go
4
93.96
-0.17% src/github.com/nats-io/nats-server/server/gateway.go
5
90.36
-0.21% src/github.com/nats-io/nats-server/server/leafnode.go
5
93.36
-0.21% src/github.com/nats-io/nats-server/server/route.go
7
82.73
-0.31% src/github.com/nats-io/nats-server/server/jetstream.go
8
52.92
-0.32% src/github.com/nats-io/nats-server/server/jetstream_errors_generated.go
10
88.46
0.12% src/github.com/nats-io/nats-server/server/consumer.go
10
73.48
-0.03% src/github.com/nats-io/nats-server/server/jetstream_api.go
73
94.66
0.0% src/github.com/nats-io/nats-server/server/server.go
248
86.15
-0.01% src/github.com/nats-io/nats-server/server/events.go
309
84.29
-0.19% src/github.com/nats-io/nats-server/server/raft.go
357
85.03
-0.18% src/github.com/nats-io/nats-server/server/stream.go
838
81.43
-0.0% src/github.com/nats-io/nats-server/server/jetstream_cluster.go
Jobs
ID Job ID Ran Files Coverage
1 13256013660.1 11 Feb 2025 05:44AM UTC 57
85.49
GitHub Action Run
Source Files on build 13256013660
  • Tree
  • List 57
  • Changed 44
  • Source Changed 6
  • Coverage Changed 20
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #13256013660
  • 6d89843a on github
  • Prev Build on main (#13233706823)
  • Next Build on main (#13278232462)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc