Commit Graph

6422 Commits

Author SHA1 Message Date
Ivan Kozlovic
f8aa3ac11d [FIXED] JetStream: "first sequence mismatch" error on catchup with message expiration
When a server was restarted and expired messages, but the leader had a snapshot that
still had the old messages we would reset complete follower stream state, this fix
just skips over the expired as we prepare the request to the leader.

Resolves #3516

Signed-off-by: Derek Collison <derek@nats.io>
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-17 17:02:08 -06:00
Derek Collison
37e876c7de Merge pull request #3560 from fantashley/nil-fss-panic
fix: Prevent nil map assignment panic if disk is full
2022-10-17 15:22:58 -07:00
Ivan Kozlovic
4247cf93b2 Merge pull request #3566 from nats-io/js_fix_flapper
Fix a test that would sometimes fail
2022-10-17 12:08:07 -06:00
Ivan Kozlovic
5df93f9c81 Fix a test that would sometimes fail
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-17 11:35:47 -06:00
Ivan Kozlovic
7a5471e5c3 Merge pull request #3565 from nats-io/js_leaf_tests
Added specific tests for using non system extended setup similar to NGS
2022-10-17 10:53:50 -06:00
Ivan Kozlovic
90e9c89594 Added specific tests for using non system extended setup similar to NGS
Signed-off-by: Derek Collison derek@nats.io
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-17 10:42:03 -06:00
Ivan Kozlovic
19ff7f5f7a Merge pull request #3561 from nats-io/fix_3550
[FIXED] JetStream: User given named ephemeral lost after migration
2022-10-14 16:01:44 -06:00
Ivan Kozlovic
bec51ed52b [FIXED] JetStream: User given named ephemeral lost after migration
If an ephemeral was given a name by the user, if the consumer leader
was then shutdown, the ephemeral would be migrated using a server
generated new name instead of keeping the user given name.

Also, in some cases the migration would not even occur. This was
likely due to the fact that RAFT node(s) were shutdown prior to
the ephemeral migration code was invoked.

Resolves #3550

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-14 15:20:45 -06:00
Ashley Nelson
c909847571 Prevent nil map assignment panic if disk is full
If the server is unable to write to disk, there is a failure mode that
results in the fss map being nil when writing message block data to it,
resulting in a panic. This fix checks whether an error is returned by
the function that loads the fss map, and if so, returns an error to
prevent future assignment.
2022-10-14 19:35:39 +00:00
Ivan Kozlovic
0ef889d5cc Merge pull request #3555 from neilalexander/neilalexander/needackunlock
Add missing `RUnlock` in `needAck`
2022-10-14 08:53:37 -06:00
Neil Alexander
ff23c217ea Add missing RUnlock in needAck 2022-10-14 11:54:06 +01:00
Ivan Kozlovic
11cc165c11 Merge pull request #3552 from nats-io/fix_3547
[FIXED] MQTT: Subjects mapping were not handled
2022-10-13 16:30:57 -06:00
Ivan Kozlovic
dde94987ce [FIXED] MQTT: Subjects mapping were not handled
A simple configuration like this:
```
...
mappings = {
  foo: bar
}

mqtt {
   port: 1883
}
```
would cause an MQTT subscription on "bar" to not receive messages
published on "foo".

In otherwords, the subject transformation was not done when parsing
a PUBLISH packet.

This PR also handles the case of service imports where transformation
occurs after the initial publish parsing.

Resolves #3547

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-13 16:00:05 -06:00
Derek Collison
3269c506a8 Merge pull request #3544 from nats-io/readme-logo
Updates to README
2022-10-11 10:03:17 +09:00
Derek Collison
8415f609d7 Updated logo for better aesthetics on dark mode.
Also added in Rethink overview video.

Signed-off-by: Derek Collison <derek@nats.io>
2022-10-11 09:56:47 +09:00
Ivan Kozlovic
04c4cce4e9 Merge pull request #3543 from nats-io/fix_flappers_update_cov_go
Fix some flappers and update Go version for nightly code coverage
2022-10-10 17:28:22 -06:00
Ivan Kozlovic
a98af54d92 Fix some flappers and update Go version for nightly code coverage
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-10 16:42:43 -06:00
Ivan Kozlovic
ccfc818e8b Bump version to v2.9.4-beta as per release instructions
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-10 15:44:44 -06:00
Ivan Kozlovic
25e82d7d99 Merge pull request #3542 from nats-io/release_2_9_3
Release v2.9.3
2022-10-10 14:59:55 -06:00
Ivan Kozlovic
096b82271e Release v2.9.3
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-10 14:52:49 -06:00
Ivan Kozlovic
09b9bf272a Merge pull request #3541 from nats-io/warn_slow_icb
Added warning if internal sub callback takes too long
2022-10-10 14:52:25 -06:00
Ivan Kozlovic
3358247e6b Added warning if internal sub callback takes too long
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-10 14:39:37 -06:00
Ivan Kozlovic
ffc1797867 Merge pull request #3537 from nats-io/js_cons_name
[FIXED] JetStream: User-defined ephemeral Name not used in cluster mode
2022-10-10 14:01:47 -06:00
Ivan Kozlovic
9bd11580e3 [FIXED] JetStream: User-defined ephemeral Name not used in cluster mode
If the user sends a CONSUMER.CREATE request with a configuration that
specifies the name that the user wants for the ephemeral consumer,
this would not work on cluster mode, that is, the server would still
pick a name instead of using the provided one.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-10 13:48:38 -06:00
Ivan Kozlovic
e42260cc80 Merge pull request #3539 from nats-io/js_handle_bad_replicas_count
[FIXED] JetStream: return error on negative replicas count
2022-10-10 13:44:34 -06:00
Ivan Kozlovic
cf71adb9de Merge pull request #3538 from nats-io/fix_import_own_export
[FIXED] Stack overflow when account imports its own export
2022-10-10 13:34:30 -06:00
Ivan Kozlovic
c3adf78702 [FIXED] Stack overflow when account imports its own export
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-10 13:20:26 -06:00
Ivan Kozlovic
3c7aa554f7 [FIXED] JetStream: return error on negative replicas count
If a stream is created or updated with a negative replicas count,
and error is now returned. Same for consumers.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-10 12:32:41 -06:00
Ivan Kozlovic
d9bf82bbda Merge pull request #3536 from nats-io/fix_main_help
Adjust "nats-server -h" output
2022-10-10 12:28:43 -06:00
Ivan Kozlovic
1a278f9066 Adjust "nats-server -h" output
Related to PR #3527

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-10 11:21:22 -06:00
Ivan Kozlovic
0fd2649f79 Merge pull request #3527 from ariel-zilber/patch-1
Fix to issues  #3524 and #3521
2022-10-10 11:01:20 -06:00
Derek Collison
cb086bcef9 Merge pull request #3530 from nats-io/dc
Test to make sure a consumer that is deleted while a server is down recovers correctly.
2022-10-07 17:38:42 +01:00
Derek Collison
c88784dcad Test to make sure a consumer that is deleted while a server is down recovers correctly.
Signed-off-by: Derek Collison <derek@nats.io>
2022-10-07 09:24:54 -07:00
Ivan Kozlovic
207195c66c Merge pull request #3529 from nats-io/js_fix_fs_filtered_purge
[FIXED] JetStream: Purge with additional options may leave some messages
2022-10-06 17:01:38 -06:00
Ivan Kozlovic
57a3594355 [FIXED] JetStream: Purge with additional options may leave some messages
While going over message blocks, when some blocks were removed there
was a risk that a block is ignored, leaving some messages around.

Resolves #3528

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-06 13:21:20 -06:00
ariel-zilber
8fd30ff5c3 Update main.go 2022-10-06 12:40:21 +03:00
Ivan Kozlovic
b7a5163d5d Merge pull request #3523 from ariel-zilber/main
fix to  bug  #3522 - update usage guide message in main.go
2022-10-05 09:45:47 -06:00
ariel-zilber
6ef5c520b2 Update main.go 2022-10-05 18:30:52 +03:00
ariel-zilber
04a5c0be3c fix to bug #3522 - update usage guide message in main.go 2022-10-05 17:14:41 +03:00
Ivan Kozlovic
37ca972251 Bump version to 2.9.3-beta.1
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-05 07:14:01 -06:00
Ivan Kozlovic
348b3d4068 Merge pull request #3519 from nats-io/fix_3516
[FIXED] JetStream: unresponsiveness while creating raft group
2022-10-05 07:12:27 -06:00
Ivan Kozlovic
3472f6aec2 [FIXED] JetStream: unresponsiveness while creating raft group
Originally, createRaftGroup() would not hold the jetstream's lock
for the whole duration. But some race reports made us change
this function to keep the lock for the whole duration. A test
called TestJetStreamClusterRaceOnRAFTCreate() was demonstrating
the race between "consumer info" request handling and createRaftGroup
code. Since then, the race has been fixed, so this PR restores
the more fine-grained locking inside createRaftGroup.

Resolves #3516

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-10-04 17:27:36 -06:00
Ivan Kozlovic
9f4513c9f7 Bump version to v2.9.3-beta as part of release process
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-30 10:27:58 -06:00
Ivan Kozlovic
6d81dde81b Merge pull request #3513 from nats-io/release_2_9_2
Release v2.9.2
2022-09-29 15:23:16 -06:00
Ivan Kozlovic
34851bfeae Release v2.9.2
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-29 15:21:53 -06:00
Ivan Kozlovic
521bfd287a Merge pull request #3512 from nats-io/update_deps
[UPDATED] Dependencies
2022-09-29 15:21:04 -06:00
Ivan Kozlovic
1039df088c [UPDATED] Dependencies
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-29 15:00:44 -06:00
Ivan Kozlovic
9cd2b7fa70 Merge pull request #3511 from nats-io/js_last_per_subject_redeliveries
[FIXED] JetStream: redeliveries for LastPerSubject delivery policy
2022-09-29 14:39:13 -06:00
Ivan Kozlovic
46aec649e4 [FIXED] JetStream: redeliveries for LastPerSubject delivery policy
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-29 14:00:18 -06:00
Ivan Kozlovic
0841786d6c Bump to 2.9.2-beta.1
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-29 09:26:09 -06:00