Commit Graph

1388 Commits

Author SHA1 Message Date
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
Derek Collison
2a2d88cd1f Updated PR template 2018-03-16 15:56:22 -07:00
Derek Collison
3cd4a24f2f Updated nuid 2018-03-16 15:46:14 -07:00
Derek Collison
219b8538ca Added owners 2018-03-16 15:28:22 -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
982643ad44 Merge pull request #641 from nats-io/fix_sublist_race
[FIXED] RACE in Sublist
2018-03-15 15:48:30 -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
Derek Collison
1aef973099 Merge pull request #648 from caniszczyk/patch-2
Add CNCF Code of Conduct
2018-03-15 11:50:41 -07:00
Chris Aniszczyk
3ea27668cd Add CNCF Code of Conduct
per CNCF project requirements
2018-03-15 11:38:25 -07:00
Derek Collison
6ca6f5de19 Merge pull request #645 from caniszczyk/patch-1
Add reference to CNCF
2018-03-15 11:35:29 -07:00
Chris Aniszczyk
0d511fc7bc Add reference to CNCF 2018-03-15 11:23:30 -07: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
Colin Sullivan
508ce2bcf3 implement io.Closer interface in the logger 2018-03-13 19:08:45 -06:00
Colin Sullivan
f7368bf903 Add config files 2018-03-13 15:38:52 -06:00
Colin Sullivan
182be3feb9 Close files on reload. 2018-03-13 15:31:45 -06:00
Ivan Kozlovic
a3e8fba6b3 Add options for each monitoring endpoint and added Connz
Even for endpoints that currently do not need options (such as
Subsz and Varz), I added some options and a return of error so that
we don't break the API if we ever need to add options for those.
2018-03-13 10:30:46 -06:00
Ivan Kozlovic
6f9983291c Update comments 2018-03-12 15:53:11 -06:00
Ivan Kozlovic
fbfa8772ca Merge pull request #639 from nats-io/add_bench_for_routed_queue
Added benchmark for routed queues
2018-03-12 15:44:43 -06:00
Ivan Kozlovic
eb28cf0eda Do the copy only of the array of subscriptions that we add to the results
Instead of making a copy of the whole results, make sure that
we don't pass a sublist array to the result but its copy.
2018-03-10 08:35:15 -07:00
Ivan Kozlovic
c4470d4e68 Added Subsz and Routez and updated tests
In tests, replaced all code doing http.Get, etc.. with a readBody
helper function.
Combine server functions and monitor handler tests in one test
with a for loop to try both modes on a given test.

Still need to add Connz.
2018-03-09 20:48:43 -07:00
Tyler Treat
6c7d1dc847 Add Varz server method
Fixes #612 by adding a new Varz method to the Server. This can be used
by processes embedding gnatsd to access the Varz struct without relying
on the HTTP API. This starts with just Varz but the same pattern could
be expanded to other monitoring APIs in the future.
2018-03-09 19:37:56 -07:00
Ivan Kozlovic
668229fc1d [FIXED] RACE between sublist remove and go through match results
This would manifest for instance when server tries to send messages
to queue subscribers and a subscription is unsubsribed at the same
time.

Resolves #640
2018-03-09 19:05:33 -07:00
Ivan Kozlovic
ad1605fb96 Added benchmark for routed queues 2018-03-09 17:49:10 -07:00
Ivan Kozlovic
ee8f001131 [IMPROVED] Better attempt at delivering messages to routed queue subs
This PR is based out of #633. It imroves parsing QRSID so that the
TestRouteQueueSemantics test now passes (when dealing with malformed
QRSID).
A test similar to what is reported in #632 was also added. This
test however, uncovers a race condition that will be fixed in a
separate PR.

Resolves #632
2018-03-09 14:45:52 -07:00
Ivan Kozlovic
9d7dda11fd Merge branch 'VidScale-master' into fix_632 2018-03-09 14:42:50 -07:00
Ivan Kozlovic
1bd40f98d9 Merge branch 'master' of https://github.com/VidScale/gnatsd into VidScale-master 2018-03-09 14:42:22 -07:00
Ivan Kozlovic
dd3dccc55a Merge pull request #636 from nats-io/restore_default_test_options_port
Restore DefaultTestOptions port to 4222
2018-03-07 12:26:53 -07:00
Ivan Kozlovic
72bbd2b982 Restore DefaultTestOptions port to 4222
This is used by RunDefaultServer() and some external projects tests
may rely on the fact that this runs on the default port.

Our tests that want to use ephemeral ports to avoid port conflicts
should be updated to not use these default options and/or RunDefaultServer().
2018-03-07 12:12:19 -07:00
Ivan Kozlovic
fa662bbfdb Merge pull request #634 from nats-io/fix_connect_urls
Additional fix to #631
2018-03-06 11:32:51 -07:00
Ivan Kozlovic
4768a86316 Merge pull request #635 from nats-io/reduce_port_conflicts
Try reduce port conflicts in tests
2018-03-06 10:31:19 -07:00
Ivan Kozlovic
92796d74e1 More changes 2018-03-06 10:13:51 -07:00
Ivan Kozlovic
0ac50bda76 Try reduce port conflicts in tests 2018-03-06 08:49:45 -07:00
Ivan Kozlovic
999e0299d7 Remove unused code 2018-03-06 08:46:01 -07:00
Ivan Kozlovic
461ab96a58 Additional fix to #631
This is the result of flapping tests in go-nats that were caused
by a defect (see PR https://github.com/nats-io/go-nats/pull/348).
However, during debugging, I realize that there were also things
that were not quite right in the server side. This change should
make it the notification of cluster topology changes to clients
more robust.
2018-03-05 20:03:46 -07:00
Volodymyr Khoroz
791bfd4c37 [#632] - fix a race condition causing messages to be lost with non-zero max_msgs in a cluster 2018-03-05 18:36:24 +02:00
Ivan Kozlovic
33db08e1e9 Merge pull request #631 from nats-io/fix_connect_urls_notification_with_explicit_routes
[FIXED] Cluster toplogy change possibly not sent to clients
2018-03-04 14:54:54 -07:00
Ivan Kozlovic
3b5826455d Bump version to 1.0.7 [ci skip] 2018-03-04 14:50:47 -07:00
Ivan Kozlovic
aeca31ce51 [FIXED] Cluster toplogy change possibly not sent to clients
When a server accepts a route, it will keep track of that server
`connectURLs` array. However, if the server was creating a route
to that other server at the same time, it will promote the route
as a solicited one. The content of that array was not transfered,
which means that on a disconnect, it was possible that the cluster
topology change was not properly sent to clients.
2018-03-04 14:38:03 -07:00
Ivan Kozlovic
02dd205a48 Use GITHUB_TOKEN v1.0.6 2018-02-28 16:10:13 -07:00
Ivan Kozlovic
ef3376ca18 Merge pull request #629 from nats-io/prepare_for_v106
Prepare for release v1.0.6
2018-02-28 15:18:43 -07:00
Ivan Kozlovic
17f27ab90f Prepare for release v1.0.6
-Update Dockerfile Go version to 1.9.4
-Add ARM32v6 build of Docker image
2018-02-28 14:49:18 -07:00
Ivan Kozlovic
b474438513 Restore megacheck since upstream error is now fixed 2018-02-28 14:19:36 -07:00
Ivan Kozlovic
2d75c83aeb Remove megacheck for now
Reason: https://github.com/dominikh/go-tools/issues/269
2018-02-28 11:39:33 -07:00
Ivan Kozlovic
ba6b6f352d Merge pull request #626 from nats-io/notify_clients_when_routes_go_away
[ADDED] Notification to clients when servers leave the cluster
2018-02-28 10:48:53 -07:00
Ivan Kozlovic
1acf330e07 [ADDED] Notification to clients when servers leave the cluster
Until now, a server would only notify clients of servers that join
the cluster. More than that, a server would send ot its clients only
information if new servers were added.
This PR changes this by sending to clients that support async INFO
the list of URLs for all servers in the cluster any time that there
is a change (joining or leaving the cluster).
As of now, clients will not be affected by the change (and will not
take benefit of this: removing servers from their server pool). This
will be addressed in each supported client once this is merged.
2018-02-27 14:22:13 -07:00