Commit Graph

1435 Commits

Author SHA1 Message Date
Derek Collison
03ab1b6130 Merge pull request #283 from nats-io/add_stacksz
Add /stacksz to monitoring
2016-05-23 22:14:25 -07:00
Ivan Kozlovic
3492d25e69 Use initial buffer on stack 2016-05-23 22:41:40 -06:00
Ivan Kozlovic
2068cc7b36 Minor updates based on comments 2016-05-23 22:32:31 -06:00
Ivan Kozlovic
d46a17d228 Fix test
Use RunServer() so that it ensures that server is ready to accept
connections.
2016-05-23 20:15:26 -06:00
Ivan Kozlovic
188f7bf84c Fix possible blocking on socket write or connection close (when using TLS)
Ensure that all socket writes are protected with deadlines.
For connection Close(), also use deadlines since in case of TLS,
the Close() will send an alert (do a write) if the handshake was
completed. If the peer is not reading, this would cause the Close()
to hang.
2016-05-23 19:57:54 -06:00
Ivan Kozlovic
7bcb699903 Add /stacksz to monitoring
Allows to get the server's stacks from the monitoring interface.
2016-05-23 14:59:09 -06:00
Derek Collison
a2d03fbf5a flush immediately on creation 2016-05-22 15:04:47 -07:00
Derek Collison
67479ea4cd remove runtime import 2016-05-22 13:50:02 -07:00
Derek Collison
d4d2f5ae5c Fix flapper test 2016-05-22 13:40:50 -07:00
Antonin Amand
1eb12a1501 fix concurrent map access 2016-05-19 17:14:48 +02:00
Derek Collison
df02549dc2 Report total subscriptions under /varz 2016-05-16 12:46:30 -07:00
Derek Collison
82f04baa12 Allow optional reporting of authorized user under connz 2016-05-15 10:07:37 -07:00
Derek Collison
46a9e6f0bc First pass at multi-user support 2016-05-13 12:27:57 -07:00
Derek Collison
4bbd2231a6 update server configs and README to new listen style 2016-05-12 17:34:14 -07:00
Derek Collison
2aba059523 Supporting test configs 2016-05-12 16:58:43 -07:00
Derek Collison
9e73c1db76 Enable listen address parsing for client, cluster and http, enforce http hosts as separate 2016-05-12 16:47:01 -07:00
Derek Collison
95787732db next working version 2016-05-11 16:17:58 -07:00
Ivan Kozlovic
a8ff707aff Fix INFO_ARG parsing
In split buffer conditions, a buffer is used to accumulate bytes.
After processing, this buffer needs to be reset.

Resolves #270
2016-05-11 15:51:29 -06:00
Derek Collison
26caad27c1 Clear subs activity cache 2016-05-09 13:56:34 -07:00
Derek Collison
3ff8ad706a v0.8.0 release 2016-05-09 12:47:31 -07:00
Derek Collison
fd27025aa3 Ignore client pings for last connection activity 2016-05-09 09:56:38 -07:00
Colin Sullivan
26dab3bf8a Update PSE for Windows
* Call into the performance counter API directly
* Incorporate caching to reduce load on the server
2016-05-05 23:31:05 -06:00
Derek Collison
137c2d0109 Add sampling for pcpu 2016-05-05 13:55:23 -07:00
Derek Collison
1ebf896980 Fixup for default options 2016-05-03 16:51:23 -07:00
Derek Collison
b5a1365349 Set default host for cluster 2016-05-03 16:44:32 -07:00
Ivan Kozlovic
b36e9fe137 Move usage.go from server to main package 2016-05-03 16:51:57 -06:00
Derek Collison
7b33905db5 beta2 2016-05-03 13:00:18 -07:00
Colin Sullivan
79b4e6be10 While locally tested, this test wasn't being run with the original enhancement.
* Include the test for windows
* Call ProcUsage (versus procUsage), as test was moved.
2016-05-02 15:25:07 -06:00
Ivan Kozlovic
bb81a37cdc Fix flapping test
Introduce sleep when checking activity updates. I had fixed it
originally for Windows and then made it for all platform recently
but only for the publish case. I missed the subscribe test.
2016-04-26 18:14:01 -06:00
Ivan Kozlovic
19ea9c5a60 Add test for Connz Total connections 2016-04-26 18:00:58 -06:00
Colin Sullivan
8a07a02a97 Rename the field to 'total'. 2016-04-26 17:49:09 -06:00
Colin Sullivan
19d4848008 Access server clients within lock. 2016-04-26 17:34:03 -06:00
Colin Sullivan
a6dfe88746 Add a live connection count to /connz monitoring. 2016-04-26 17:24:01 -06:00
Derek Collison
36689b03c8 updates for release prep 2016-04-26 13:51:13 -07:00
Derek Collison
603011d0e6 Merge pull request #252 from nats-io/fix_win_build
Fix Windows build
2016-04-22 18:36:37 -07:00
Derek Collison
12fdd5dead Merge pull request #256 from nats-io/fix_data_race
Fix data race
2016-04-22 18:28:31 -07:00
Ivan Kozlovic
3691d14426 Fix missing capture of remoteID in removeClient
This needed to be captured under the client lock. Adding a test
that captured the races (when running enough times).
2016-04-22 18:06:38 -06:00
Ivan Kozlovic
3850b05388 Fix data race
When processing a connect request, there was a risk of race condition
when the server was being shutdown. Capture fields that are checked
under lock and lock when setting the route's remote ID.

Resolves #255
2016-04-22 17:28:41 -06:00
Ivan Kozlovic
acddee9c4a Fix flapping test 2016-04-22 17:10:33 -06:00
Ivan Kozlovic
a5c393f79a Add check for route TLS handshake error 2016-04-22 16:18:59 -06:00
Ivan Kozlovic
16bd806c46 Move definition of tls usage outside of function that prints it 2016-04-22 15:22:04 -06:00
Colin Sullivan
88af5f193a Add TestTlsCipher. 2016-04-22 15:00:19 -06:00
Ivan Kozlovic
2b8891364a Add more code coverage for server's parser
Test error conditions.
2016-04-22 14:41:19 -06:00
Ivan Kozlovic
ad1198db85 Add code coverage
-Test coverage was no longer triggered due to the check for BUILD_GOOS
 environment variable that was removed. Removed the check.
-Re-run test package with server code coverage.
-Remove unused functions in test.go.
-Add test for a function in test.go.
-Add missing parse +OK test.
2016-04-22 13:03:04 -06:00
Ivan Kozlovic
7a43747107 Remove comment 2016-04-22 07:45:20 -06:00
Ivan Kozlovic
bff3603606 Fix Windows build
Code referenced Debugf which is not available in this package
2016-04-21 18:34:24 -06:00
Ivan Kozlovic
3a999c1299 Add tracking of most go routines started by the server
Refactor the way client is initialized. We need to ensure that
clients are not added to the clients map and readLoop started if
the server is in the process of being shutdown otherwise there
is a chance that the server already gathered the list of connections
to close and this one would not be included, leaving a readLoop
running.
Same occurs for routes, with the complexity that the readLoop is
started well before the route connection is added to the server
routes' list. We need a temporary map that contains those connections
to be able to close them on server Shutdown.

Fixed some flapping tests.
2016-04-21 11:48:39 -06:00
Ivan Kozlovic
3aa09ecc01 Ensure Shutdown() waits for outstanding routes go routines
We need to make sure that when Shutdown() returns, routes go routines
that try to connect or reconnect have returned. Otherwise, this may
affect tests running one after the other (a server from one test
may connect to a server in the next test).
2016-04-21 11:48:39 -06:00
Derek Collison
5bea74c2ed Rename and move some things around 2016-04-21 09:33:26 -07:00
Derek Collison
6004a4e528 Update copyright 2016-04-18 20:31:56 -07:00