Derek Collison
416af2525c
Merge pull request #199 from nats-io/connz_changes
...
Reduce number of objects needed to sort connections in HandleConnz
2016-02-08 21:47:03 -08:00
Ivan Kozlovic
e5f0dabe08
Reduce memory allocations + fix c.NumConns that may have been wrong.
...
c.NumConns was set early to len(s.clients). However, after the sort, it was possible that the actual Conns[] array be much smaller due to minoff/maxoff.
So c.NumConns is now updated only after applying the offsets.
In order to pre-allocate the Conns buffer, I no longer skip a client if tlsRequired is true and connection is gone. I will simply not update the TLSVersion and TLSCipher.
2016-02-08 20:46:22 -07:00
Ivan Kozlovic
08b8dd796a
Fix test to check Idle instead of relying on client id.
...
Since client connections are handled in go routines, we don't have a guarantee that the second client's id will be > than the first.
2016-02-08 15:51:41 -07:00
Ivan Kozlovic
ecec51a771
Reduce number of objects require to sort connection in HandleConnz
...
- Use 'Pair' again, but this time, the key is an int64 that the selected sort field will be casted to.
We therefore have now only one type of sort.
- Check validity of sort string early on.
- Ensure that the ConnInfo's field used by the sort is not the value from 'client', but really the one
that was used for the sort.
- Added a test for sort by Idle time.
2016-02-08 15:40:42 -07:00
Derek Collison
d22b52b20e
Merge pull request #198 from nats-io/fix_parallel_monitor_tests
...
Fix parallel monitor tests
2016-02-08 12:18:14 -08:00
Ivan Kozlovic
b6292d6d6d
Fix monitor port usage for parallel tests.
...
Use a different MONITOR_PORT for different test packages.
2016-02-08 09:33:39 -07:00
Ivan Kozlovic
945fb0997a
Fix missing return after Fatalf() calls.
...
Due to clash on monitor ports, running parallel tests could cause failure to create monitor listener. The missing return would then cause a nil pointer error when starting to server http requests.
2016-02-08 09:30:44 -07:00
Derek Collison
1a06713304
Merge pull request #197 from nats-io/monitor_race
...
Fix races in monitoring
2016-02-06 07:46:09 -08:00
Derek Collison
1d5f4c3373
For possible slow travis tests
2016-02-06 07:41:37 -08:00
Derek Collison
a8f622269b
For possible slow travis tests
2016-02-06 07:35:09 -08:00
Derek Collison
d7c8e6bca8
Fix races in monitoring
...
- Possible race/invalid value in LastActivity
- Routez
- Believe fixes #189
2016-02-06 07:09:13 -08:00
Derek Collison
ddda4abbda
Merge pull request #196 from nats-io/queue_subs
...
Randomize distribution to subscribers
2016-02-05 09:18:20 -08:00
Derek Collison
853b4d720b
Randomize distribution to subscribers
...
Better performance for queue subscriber distribution.
2016-02-05 09:06:17 -08:00
Derek Collison
809f88a03a
subs could be random
2016-02-05 08:32:11 -08:00
Derek Collison
907c226849
remove alloc tracking
2016-02-05 07:50:19 -08:00
Derek Collison
2fcdebc34d
formatting
2016-02-05 07:36:48 -08:00
Derek Collison
661238eb1a
Add 8 subscriber queue benchmark
2016-02-05 07:34:21 -08:00
Derek Collison
c0ba6c291f
Default sort by cid for connz
2016-02-05 06:07:44 -08:00
Derek Collison
703f928a4d
Fix race on last activity
2016-02-05 05:58:09 -08:00
Derek Collison
9702156d72
Connection sort updates
...
- fix bug that did not update last activity on message delivery
- added sort capabilities for last activity
- avoid extra Reverse by simply changing Less func
2016-02-05 05:49:53 -08:00
Derek Collison
b4a6547a18
report len(ci.subs)
2016-02-04 18:05:50 -08:00
Derek Collison
5e73ebb622
Merge pull request #191 from nats-io/last_activity
...
Support for connection last activity tracking.
2016-02-04 17:58:29 -08:00
Derek Collison
26185a9722
Support for connection last activity tracking
2016-02-04 17:33:40 -08:00
Derek Collison
6b4f6f20ee
Merge pull request #190 from nats-io/fix_race_monitor
...
Fix race on connz monitor (issue #189 )
2016-02-03 22:10:48 -08:00
Ivan Kozlovic
0540df470c
Use values from ClientInfo instead of client when returning ConnInfo.
...
When we are returning ConnInfo, if we use the client's current value, they may be off compared to the values used for the sort.
2016-02-03 22:03:38 -07:00
Ivan Kozlovic
e893d873be
Forgot to use atomic for inMsgs and inBytes in one place.
2016-02-03 21:36:07 -07:00
Ivan Kozlovic
1d6dafc6a7
Fix race on connz monitor (issue #189 )
2016-02-03 21:26:26 -07:00
Derek Collison
7c89bc05a1
Merge pull request #166 from repejota/feature/lint
...
Fixed "golint ." issues
2016-02-03 18:58:23 -08:00
Derek Collison
02dc7ed668
Merge pull request #186 from wallyqs/unsub-spc-state
...
Add UNSUB_SPC parser state
2016-02-03 18:53:36 -08:00
Derek Collison
76970a7c79
Merge pull request #188 from nats-io/fix_server_start_check
...
Fix code that checks that server is started + route test
2016-02-03 18:51:26 -08:00
Ivan Kozlovic
eb0eabff04
Replace all changes with simple 25ms delay after connection close.
2016-02-03 18:58:42 -07:00
Ivan Kozlovic
437458e13e
Fix completeConnection + fix monitor test.
...
Don't check what is sent back. The point is that the client should be fully initialized at this point.
We can't ensure using metrics that the "check" connection is gone since in some tests, the server is started and clients auto-reconnect to it.
For tests that depend on the number of clients connected (such as the monitor one), have specific code for those tests.
2016-02-03 18:08:52 -07:00
Ivan Kozlovic
0a4da78f38
Fix code that checks that server is started + route test
...
- The raw connection used to check that the server is started now consumes the INFO and sends PING and consumes PONG before returning.
- The route test needs to make sure that the client connection has client id 2. Using PING/PONG before creating route connection to make sure of that.
2016-02-03 15:01:00 -07:00
Waldemar Quevedo
86824713c6
Add UNSUB_SPC parser state
2016-02-02 21:39:30 -08:00
Derek Collison
ed7a0b1852
Merge pull request #183 from nats-io/usage
...
Add 'auth' option, make all usage hints uniform with conventions
2016-02-02 16:53:24 -08:00
Derek Collison
24b11647c2
Merge pull request #185 from nats-io/prop-o-gation
...
Corrected spelling of 'propagated' and 'propagation'
2016-02-02 15:19:08 -08:00
Larry McQueary
e737604303
Modified --auth to reflect required token
2016-02-02 15:11:48 -07:00
Larry McQueary
7b5baa97d1
Corrected spelling of 'propagated' and 'propagation'
2016-02-02 12:22:49 -07:00
Larry McQueary
6396455663
Add 'auth' option, make all usage hints uniform with conventions
2016-02-02 11:50:01 -07:00
Derek Collison
ed3c20f13e
Updates [ci skip]
2016-02-01 12:35:36 -08:00
Derek Collison
972b9c18ac
Merge pull request #174 from nats-io/coverage
...
Better coverage support
2016-01-17 10:02:24 -08:00
Derek Collison
468c6af6f5
Remove unused scripts
2016-01-17 10:01:47 -08:00
Derek Collison
a28ce73281
Better coverage support
2016-01-17 09:57:11 -08:00
Derek Collison
25732e087b
New client TLS handling
2016-01-16 17:46:04 -08:00
Derek Collison
59a52ed83a
Documentation updates, minor fixes
2016-01-10 09:14:26 -08:00
Derek Collison
2553ad7c30
Merge pull request #173 from nats-io/monitoring
...
Monitoring
2016-01-09 15:58:46 -08:00
Derek Collison
6433e55314
bad test conditional
2016-01-09 10:09:05 -08:00
Derek Collison
6bd8f5fd70
inlined roothtml
2016-01-09 10:04:42 -08:00
Derek Collison
3af90e454f
Track total connections, http request stats
2016-01-09 09:57:04 -08:00
Derek Collison
b0c22e9dfd
Track start and uptime per connection
2016-01-09 08:20:24 -08:00