When a queue subscriber was updated multiple times over a leafnode
connection we added in more shadow subscriptions which could become
zombies when the connection went away.
In a case where a leafnode server had multiple queue subscribers on the
same queue group, the hub server would add in multiple shadow subs.
These subs would not be properly cleaned up and could lead to stale
connections being associated with them.
Signed-off-by: Derek Collison <derek@nats.io>
In a case where a leafnode server had multiple queue subscribers on the same queue group, the hub server would add in multiple shadow subs. These subs would not be properly cleaned up and could lead to stale connections being associated with them.
Signed-off-by: Derek Collison <derek@nats.io>
- [X] Branch rebased on top of current main (`git pull --rebase origin
main`)
- [X] Changes squashed to a single commit (described
[here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
- [x] Build is green in Travis CI
- [X] You have certified that the contribution is your original work and
that you license the work to the project under the [Apache 2
license](https://github.com/nats-io/nats-server/blob/main/LICENSE)
Fixes a behavior where idempotency of re-defining the same stream more
than once (with the same attributes) was broken due to the DeepEqual
failing due to the StreamSource struct received from the client app not
having a value for the `iname` structure field (as it's internal) but
the StreamSource struct return from `mset.config()` would have it set.
Signed-off-by: Jean-Noël Moyne <jnmoyne@gmail.com>
Streams with many interior deletes was causing issues due to the fact
that the interior deletes were represented as a sorted []uint64. This
could cause snapshots for streams R>1 and with lots of interior deletes
to take up more memory and cpu then we want.
This new approach introduces 3 sub types of delete blocks, an avl
bitmask tree, a run length encoding, and the legacy format above. We
also take into account large interior deletes such that on receiving a
snapshot we can skip things we already know about.
Signed-off-by: Derek Collison <derek@nats.io>
Streams with many interior deletes was causing issues due to the fact that the interior deletes were represented as a sorted []uint64.
This approach introduces 3 sub types of delete blocks, avl bitmask tree, a run length encoding, and the legacy format above.
We also take into account large interior deletes such that on receiving a snapshot we can skip things we already know about.
Signed-off-by: Derek Collison <derek@nats.io>
These tests are to help verify that routes aren't leaking when they go
down for write deadlines or auth failures.
Signed-off-by: Neil Twigg <neil@nats.io>
If we're on a branch other than main or dev, then when building
"nightly", build it with the name of the branch instead. Overrideable
via an env var.
It's a bit ugly because of limitations of goreleaser templating, we
can't haul the expression out to be defined once, but it works.
Can build a custom Docker image with:
goreleaser release --snapshot -p 2 -f .goreleaser-nightly.yml --clean
If we're on a branch other than main or dev, then when building "nightly",
build it with the name of the branch instead. Overrideable via an env var.
It's a bit ugly because of limitations of goreleaser templating, we can't haul
the expression out to be defined once, but it works.
Can build a custom Docker image with:
goreleaser release --snapshot -p 2 -f .goreleaser-nightly.yml --clean
When creating a consumer on a stream with a very large number of msg
blks, calculating numPending could be slow.
This aims to optimize a bit, more work to be done on streams with a very
large (> 200k) number of msg blks.
Signed-off-by: Derek Collison <derek@nats.io>
This aims to optimize a bit, more work to be done on streams with a very large (> 200k) number of msg blks.
Signed-off-by: Derek Collison <derek@nats.io>
For NATS Server on Windows, provide option for TLS certificate and
handshake signature to be provided by the Windows Certificate Store
instead of PEM files.
- [ ] Link to issue, e.g. `Resolves #NNN`
- [ ] Documentation added (if applicable)
- [x] Tests added
- [x] Branch rebased on top of current main (`git pull --rebase origin
main`)
- [x] Changes squashed to a single commit (described
[here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
- [x] Build is green in Travis CI
- [x] You have certified that the contribution is your original work and
that you license the work to the project under the [Apache 2
license](https://github.com/nats-io/nats-server/blob/main/LICENSE)
### Changes proposed in this pull request:
- New benchmark for NATS JetStream Object Store
This option is not available in the config, and is only accessable to
embeded servers where when using custom loggers can look pretty terrible
- [x] Branch rebased on top of current main (`git pull --rebase origin
main`)
- [x] Changes squashed to a single commit (described
[here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
- [x] Build is green in Travis CI
- [x] You have certified that the contribution is your original work and
that you license the work to the project under the [Apache 2
license](https://github.com/nats-io/nats-server/blob/main/LICENSE)
### Changes proposed in this pull request:
- Add ability to disable the jetstream ascii art banner on embeded
servers as when using custom logging skews the ascii art.
```
INFO[2023-06-20T21:00:54-07:00] Starting JetStream
INFO[2023-06-20T21:00:54-07:00] _ ___ _____ ___ _____ ___ ___ _ __ __
INFO[2023-06-20T21:00:54-07:00] _ | | __|_ _/ __|_ _| _ \ __| /_\ | \/ |
INFO[2023-06-20T21:00:54-07:00] | || | _| | | \__ \ | | | / _| / _ \| |\/| |
INFO[2023-06-20T21:00:54-07:00] \__/|___| |_| |___/ |_| |_|_\___/_/ \_\_| |_|
INFO[2023-06-20T21:00:54-07:00]
INFO[2023-06-20T21:00:54-07:00] https://docs.nats.io/jetstream
INFO[2023-06-20T21:00:54-07:00]
```
Previously, the server would reject a second remote leafnode connection
from the same server if it was binding to the same account on the hub
even if the remote was using different local accounts.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Previously, the server would reject a second remote leafnode connection
from the same server if it was binding to the same account on the hub
even if the remote was using different local accounts.
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This allows the CPU and goroutine profiles to be annotated with
information that allows us to break down load based on accounts, streams
and consumers. We could probably add more labels elsewhere for other
purposes too. It makes it easier to spot whether there are certain
assets that are responsible for heavy CPU usage, i.e. snapshotting
certain stream states.
Signed-off-by: Neil Twigg <neil@nats.io>
This fixes#4252 by ensuring that `tls_available`, `tls_required`, `host` and `port`
are populated based on the WebSocket listener rather than standard listeners.
Signed-off-by: Neil Twigg <neil@nats.io>
This fixes#4252 by ensuring that `tls_available`, `tls_required`,
`host` and `port` are populated based on the WebSocket listener rather
than standard listeners.
Signed-off-by: Neil Twigg <neil@nats.io>
This fixes#4252 by ensuring that `tls_available`, `tls_required`, `host` and `port`
are populated based on the WebSocket listener rather than standard listeners.
Signed-off-by: Neil Twigg <neil@nats.io>