Commit Graph

769 Commits

Author SHA1 Message Date
Ivan Kozlovic
bf3bc81722 Add route permissions
The `client.perms` struct is left unchanged. We simply map Import
and Export semantics to existing Publish and Subscribe ones.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-06-21 17:04:10 -06:00
Derek Collison
c218d9b0ec Fix for #278
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-20 22:41:05 -07:00
Derek Collison
7e28af236b Support for RTT - #643
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-20 20:18:59 -07:00
Derek Collison
240e21ac5c Fix restart of server
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-19 22:32:50 -07:00
Derek Collison
37352edff0 Fixes #681
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-19 16:42:39 -07:00
Derek Collison
f7cb616cd2 Optimization per @cdevienne
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-12 13:38:13 -07:00
Derek Collison
4fb84e229c Avoid lock to server with client lock held
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-12 12:55:50 -07:00
Derek Collison
844f376140 Performance optimizations, beta3, fixes to various tests.
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-11 15:11:03 -07:00
Derek Collison
d603c53f67 Big message optimizations, slow consumer updates
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
6299e034cb dynamic buffer updates
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
4dd4d2bd9d lock users access
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
cc07d500dd new subs collector
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
50bb4b9a1b delivery last activity update 2018-06-04 17:45:05 -07:00
Derek Collison
955d8ee698 require 1.9 or above, bug fix in test 2018-06-04 17:45:05 -07:00
Derek Collison
3e2e8c9ce5 Fixed bug reusing test sub
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
d3213df7f1 Fix data race
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
26dafe464b Don't send route unsub with max
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
049db6e854 Support for queue subscriber retries over routes
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
30e31d5cd2 Test dynamic buffers, track short reads/writes
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
e9178f1f42 Performance tweaks
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
e64ac424c1 Check flushOutbound and snapshot write_deadline and max_pending
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
df574ce951 varz cluster empty when not defined
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
766ef3b0b1 Add max_pending and write_deadline to varz
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
50a99241ea Slow consumer updates and latency improvements.
Use pending bytes as slow consumer trigger, so reintroduce max_pending.
Improve latency with inplace flush calls when appropriate. Utilize simple
time budget for readLoop routine.

Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
481697ef67 New outbound data architecture
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
644376209b Added large payload pub/sub benchmark
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
25654a4632 Collect pub permissions into own function 2018-06-04 17:45:05 -07:00
Derek Collison
8502fb1edc Add fast slice for large psubs for Match
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Derek Collison
b9c73e96ee Changed sublist to avoid quadratic time in removal with large N
Signed-off-by: Derek Collison <derek@nats.io>
2018-06-04 17:45:05 -07:00
Ivan Kozlovic
ac42bb0bb9 Remove route connection from temp map
When a route connection is created, the server will keep track
of the client structure in a special map until the route protocol
completes. This is meant so that if the server is shutdown before
the route is registered in routes map, the server can kick out
the connection's readLoop.

The route connection was correctly removed on success, but was
not for route connections that were not registered and dropped.
This was not causing any issue, but for correctness, doing the
removal now when server removes a route connection.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-04-11 16:49:08 -06:00
Ivan Kozlovic
b0ebdbed7d Fixed typo 2018-04-09 09:14:21 -06:00
Ivan Kozlovic
9d11587e49 Add test to ensure server handles more than 1 signal
Also, try to fix flapping test
2018-04-06 17:24:41 -06:00
Ivan Kozlovic
40cf0107d6 Ensure sig handler routine returns on shutdown, turn it off in most tests
I noticed that when running the test suite, there would be a file
server/log1.txt left. This file is created by one of the config
reload test. Running this test individually was doing the proper
cleanup. I noticed that the Signal test that was checking
that files could be rotated was causing this side effect.
It turns out that none of the config reload tests were disabling
the signal handler (NoSigs=true), and since the go routine would
be left running, running the TestSignalToReOpenLogFile() test
would interact with an already finished test.

I put a thread dump in handleSignals() to track all tests that
were causing this function to start the go routine because NoSigs
was not set to true. I fixed all those tests. At this time, there
are only 2 tests that need to start the signal handler.

I have also fixed the code so that the signal handler routine select
on a server quitCh that is closed on shutdown so that this go routine
exit and is waiting on using the grWG wait group.
2018-04-06 17:14:02 -06:00
Gabriel Guzman
f7f333ed2f Update 2018-03-29 11:48:09 -04:00
Gabriel Guzman
a29b08073e Add pse file for openbsd 2018-03-29 09:41:45 -04:00
Ivan Kozlovic
effc6b1f3f Merge pull request #657 from nats-io/route-port-display
[FIXED] Random cluster port displayed as 0 instead of actual value
2018-03-23 17:17:48 -06:00
Ivan Kozlovic
c2a095581e Bump version for dev [ci skip] 2018-03-23 17:17:13 -06:00
Alberto Ricart
d76ae5c6e3 FIX to display actual port selected if -1 is provided in a cluster url such as --cluster nats://localhost:-1. 2018-03-23 17:36:33 -05:00
Ivan Kozlovic
705d8f5fe8 Fix last activity monitoring test
This test originally used only 1 connection. It was then modified
to use another connection to check the publishing effect into
the last activity. However, when polling for connz we were using
[0], but that may not necessarily match the connection we were
checking.
I don't think that there was a need for a new connection in this
test, so use a single connection.
2018-03-23 14:20:16 -06:00
Ivan Kozlovic
fb972bd0fc Remove ssl_required references 2018-03-23 13:40:10 -06:00
Ivan Kozlovic
8cb7c18204 Prepare for release 1.1.0 2018-03-23 11:53:04 -06:00
Derek Collison
b2a9ed97d6 Merge pull request #650 from nats-io/cncf
Move to CNCF and Apache 2 License
2018-03-16 16:23:10 -07:00
Ivan Kozlovic
c16a1dbcc7 Merge pull request #638 from nats-io/fix_632
[IMPROVED] Better attempt at delivering messages to queue subscriptions
2018-03-16 16:01:38 -06:00
Ivan Kozlovic
8d539a4bb0 Merge pull request #615 from nats-io/varz_func
[ADDED] Monitor endpoints as server methods (Varz(), etc..)
2018-03-16 15:46:01 -06:00
Ivan Kozlovic
4e9d785423 Capture possible error in Atoi conversion of url params 2018-03-16 10:42:52 -06:00
Derek Collison
00901acc78 Update license to Apache 2 2018-03-15 22:31:07 -07:00
Ivan Kozlovic
4aa04a6697 Merge pull request #644 from nats-io/fix-reload-open-files
[FIXED] Close old log files when reloading (log rotation)
2018-03-15 17:55:39 -06:00
Ivan Kozlovic
3bfb2d7cb4 Variant of copy and add some tests
Use the append([]*subscription(nil), qr...) notation instead of
make()+copy().
2018-03-15 14:54:10 -06:00
Colin Sullivan
920cdddfc8 Change log level to error 2018-03-14 10:29:44 -06:00
Colin Sullivan
bc59ad6ba7 Fix capitalization in log statement 2018-03-13 19:12:41 -06:00