Commit Graph

1681 Commits

Author SHA1 Message Date
Ivan Kozlovic
0744bb64c3 Merge pull request #799 from nats-io/update_lame_duck_mode
Introduce some delay before closing clients in LameDuck mode.
2018-11-08 19:46:19 -07:00
Ivan Kozlovic
7b25c0890d Merge pull request #798 from nats-io/fix_account_race_on_reload
Fix data race on config reload with routes and accounts
2018-11-08 19:41:21 -07:00
Ivan Kozlovic
eb17950971 Introduce some delay before closing clients in LameDuck mode.
This will allow to signal multiple servers at once to go in
that mode and not have their client reconnect to one of the
servers in the group.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-11-08 18:34:15 -07:00
Ivan Kozlovic
49105b7294 Fix data race on config reload with routes and accounts
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-11-08 18:12:04 -07:00
Ivan Kozlovic
5180a7fbcd Merge pull request #797 from nats-io/move_tests_to_no_race
Update tests on Travis with tweaked GC settings
2018-11-08 17:14:54 -07:00
Ivan Kozlovic
4a8cb26a8e Fixed a flapper
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-11-08 17:06:45 -07:00
Ivan Kozlovic
1817b354e3 Update tests on Travis with tweaked GC settings
Moved some tests to "no race" tests that are run separately.
Removing -v and adding -p=1.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-11-08 16:56:20 -07:00
Derek Collison
2a7f23f61d Merge pull request #796 from nats-io/import_wc
Fix for #793
2018-11-08 09:26:21 -08:00
Derek Collison
15bdfbb4aa Fix for #793
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-07 19:50:45 -08:00
Ivan Kozlovic
96e2e00510 Merge pull request #795 from nats-io/fix_trace_race
Fixed data race with client trace flag
2018-11-07 16:55:03 -07:00
Ivan Kozlovic
0c11279946 Fixed data race with client trace flag
This was introduced with ec3115ad21

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-11-07 16:33:30 -07:00
Derek Collison
b46d3fbcd9 Merge pull request #794 from nats-io/deny_perms
Fix for #792
2018-11-07 10:54:32 -08:00
Derek Collison
42b5e664c6 Cleanup reload logic on subs
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-07 09:57:26 -08:00
Derek Collison
5077025801 Make assiging global account consistent
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-07 09:52:29 -08:00
Derek Collison
a442f6cde4 Collect remove subs on first check
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-07 09:25:32 -08:00
Derek Collison
3dde5b5a93 megacheck fix
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-06 20:06:18 -08:00
Derek Collison
b2ec5b3a98 Added more tests, e.g. reload
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-06 19:58:42 -08:00
Derek Collison
1ce1a434b0 Fix for #792
Allow deny clauses for subscriptions to still allow wildcard subscriptions but do not deliver the messages themselves.

Signed-off-by: Derek Collison <derek@nats.io>
2018-11-06 15:00:21 -08:00
Derek Collison
0d13c90a32 Merge pull request #790 from nats-io/allow-conf-var-in-accounts-block
Allow conf vars within account block
2018-11-04 09:05:29 -08:00
Waldemar Quevedo
61d1ec53fa Allow conf vars within account block
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-11-02 14:42:29 -07:00
Derek Collison
2e579b8220 Remove double allocation
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-01 13:53:44 -07:00
Derek Collison
57a7471cb5 Merge pull request #786 from nats-io/new_routes
Cluster Protocol Rewrite
2018-11-01 13:51:47 -07:00
Derek Collison
57904107b2 Added L1 cache to routes
Signed-off-by: Derek Collison <derek@nats.io>
2018-11-01 13:31:12 -07:00
Derek Collison
ea5a6d9589 Updates for comments, some golint fixes
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-31 20:28:44 -07:00
Derek Collison
4058948185 Updates based on feedback
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-29 13:51:21 -07:00
Derek Collison
ec3115ad21 Fix double trace
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-25 09:30:13 -07:00
Derek Collison
47963303f8 First pass at new cluster design
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-24 21:29:29 -07:00
Waldemar Quevedo
037acf1310 Merge pull request #785 from nats-io/conf-dangling-quote
Fix conf parser hang on dangling quote
2018-10-24 15:42:13 -07:00
Ivan Kozlovic
d33be3aaa3 Merge pull request #784 from nats-io/accounts_reload
Added support for Accounts reload
2018-10-24 14:14:41 -06:00
Ivan Kozlovic
9a1cb08394 Updates based on comments
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-10-24 11:05:14 -06:00
Waldemar Quevedo
e8928b7eed Fix conf parser hang on dangling quote
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-10-23 17:45:08 -07:00
Ivan Kozlovic
d35bb56d11 Added support for Accounts reload
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-10-23 14:58:53 -06:00
Ivan Kozlovic
77548d493c Merge pull request #780 from nats-io/lame_duck_mode
Added support for lame duck mode
2018-10-23 14:55:32 -06:00
Ivan Kozlovic
c173d55e2e Update based on comments
Start the lame duck mode in a go routine in the signal handler
because I think we want to be able to shutdown the server while
in that mode.

Kept the closing as a loop in the lameDuckMode() function (did
not use a timer).

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-10-22 16:27:30 -06:00
Ivan Kozlovic
0067c3bb04 Added support for lame duck mode
When receiving SIGUSR2 signal (or -sl ldm) the server stops
accepting new clients, closes routes connections and spread the
closing of client connections based on a config lame duck duration
(default is 30sec). This will help preventing a storm of client
reconnect when a server needs to be shutdown.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-10-19 19:07:37 -06:00
Waldemar Quevedo
8dfce4b3d7 Merge pull request #769 from nats-io/config-report-pos-always
Include source of configuration error by default
2018-10-16 14:24:10 -07:00
Waldemar Quevedo
e819f15ca4 Collecting all config errors then flush before exit
Show warnings on server startup

Removes notions around `pedantic` checks and instead
just reports the warnings in case there were any, or
the collection of errors that may have been found
in the configuration file.

Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-10-16 13:29:29 -07:00
Waldemar Quevedo
ed1af40996 Add source to config errors
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-10-16 13:29:29 -07:00
Waldemar Quevedo
fdd1536a8a Always parse config file with checks enabled
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-10-16 13:29:29 -07:00
Derek Collison
45089aff4c Merge pull request #777 from msoap/patch-1
Use the last Go version for travis CI
2018-10-14 09:51:11 -07:00
Sergey Mudrik
0eebccbed8 Use the last Go version for travis CI 2018-10-14 19:30:25 +03:00
Waldemar Quevedo
3b0b139158 Merge pull request #776 from wallyqs/connect-pass-regex-fixes
Fixes to remove traced password
2018-10-12 18:28:18 -07:00
Waldemar Quevedo
a0fe8fd0a5 Fixes to remove traced password
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2018-10-12 17:00:41 -07:00
Derek Collison
71eb6d80d2 Merge pull request #775 from nats-io/shadow
Cleanup of shadowed subscriptions, fixes #772
2018-10-08 11:33:48 -07:00
Derek Collison
05bfeddbce Fix comment
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-08 11:24:14 -07:00
Derek Collison
ce95e5a84b Cleanup of shadowed subscriptions, fixes #772
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-08 09:53:41 -07:00
Derek Collison
3438468c95 ring buffer test
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-06 14:06:14 -07:00
Derek Collison
21ee7ed81a Fixes #770
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-06 14:04:14 -07:00
Derek Collison
2b0e5b07f4 Merge pull request #767 from nats-io/global_account
Support for global/reserved accounts
2018-10-04 15:47:23 -07:00
Derek Collison
b014db8502 Updates based on comments
Signed-off-by: Derek Collison <derek@nats.io>
2018-10-04 12:50:12 -07:00