Commit Graph

1989 Commits

Author SHA1 Message Date
Ivan Kozlovic
04450f2d99 JetStream: clear erased bit when reading sequence number
Also changed the link to travis-ci.com instead of .org

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-10-29 13:17:21 -06:00
Derek Collison
0f22e99601 Merge pull request #1675 from nats-io/filestore
Stability and performance updates for filestore.
2020-10-28 19:16:44 -07:00
Derek Collison
283c632d8b Updates based on PR feedback and fix for merge regression with pending PR
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-28 18:58:42 -07:00
Derek Collison
225e22667c Make flush channel buffered since we do non-blocking kicks
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-28 12:42:31 -07:00
Derek Collison
ad452190e3 Make sure flushLoop is running before returning from constructor.
We had a situation in constrained events where the flusher was not
started running fast enough and flush events were missed and caches
became stale.

Signed-off-by: Derek Collison <derek@nats.io>
2020-10-28 11:35:57 -07:00
Derek Collison
ebae9f452c Always return with no cache, optionally reset timer
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-28 08:30:52 -07:00
R.I.Pienaar
a88c2ee349 rename consumer pending fields for clarity
Signed-off-by: R.I.Pienaar <rip@devco.net>
2020-10-28 16:12:01 +01:00
Derek Collison
c38bee747d With no limits was setting blkSize to smallest which was wrong
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-28 07:58:47 -07:00
Derek Collison
e16bd843e3 Updates based on PR feedback
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-28 07:58:47 -07:00
Derek Collison
fe2b354414 Stability and performance updates.
The original design had a shared filestore write buffer and individual message blocks had a read cache.
This presented some performance and stability issues when lots of reads and deletes were happening to a
message block that was also being written to actively.

This change eliminates the shared write buffer and uses the message block's cache as a write through as
well as read cache and handles partials correctly.

Signed-off-by: Derek Collison <derek@nats.io>
2020-10-28 07:58:47 -07:00
Derek Collison
df4ee081a5 Track number of stream pending for each consumer.
This will track the stream pending state for each consumer.
This code does account for filtered consumers.

Signed-off-by: Derek Collison <derek@nats.io>
2020-10-27 19:30:42 -07:00
Phil Pennock
773ac7fbd1 Bump version to 2.2.0-beta.27 (#1670)
Signed-off-by: Phil Pennock <pdp@synadia.com>
2020-10-23 15:38:44 -04:00
Derek Collison
32b6cf8145 Merge pull request #1668 from nats-io/dedupe
Purge clears dedupe window as well
2020-10-23 06:22:25 -07:00
Derek Collison
e116fc2a78 Merge pull request #1666 from nats-io/nointerest
Add store.SkipMsg() and update no interest retention streams
2020-10-23 05:54:32 -07:00
Derek Collison
987892b260 Purge clears dedupe window as well
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-23 05:52:05 -07:00
R.I.Pienaar
b337edb447 always include purged number
When purging an empty stream success is true but the
purged is then omitted since its, correctly, 0. It's
better to include it even when zero so it's not weirdly
inconsistent between succesful purges.

Also helps with validation of payloads

Signed-off-by: R.I.Pienaar <rip@devco.net>
2020-10-23 12:58:42 +02:00
Derek Collison
ad247d1853 Add store.SkipMsg() and update no interest retention streams
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-22 19:35:28 -07:00
Derek Collison
63477acb61 Merge pull request #1658 from nats-io/waitq
[JetStream] Upgrade for wait queues for pull based consumers
2020-10-22 09:59:57 -07:00
Ivan Kozlovic
46a4969813 Moved test to ones run without -race and cap number of conns
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-10-22 10:11:16 -06:00
Ivan Kozlovic
1dca361d01 Merge pull request #1661 from nats-io/accz
Adding more debugging information to accountz
2020-10-22 09:45:24 -06:00
Ivan Kozlovic
24eed934af Merge pull request #1662 from nats-io/latency
[FIXED] Do not report bad latency results on auto-unsubscribe triggers
2020-10-22 09:08:06 -06:00
Derek Collison
511cdaa5ac Do not report bad latency on auto-unsubscribe triggers
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-22 05:41:33 -07:00
Matthias Hanel
c2c04b6cf9 Fix timing issue in unit test
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-10-22 02:23:15 -04:00
Matthias Hanel
c907245bfc Adding more debugging information to accountz
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-10-21 18:29:22 -04:00
Ivan Kozlovic
bea9fca24c Prevent panic when accepting TLS leafnode connections
This is an addition to PR #1652. I have simply added a check but
at this point in time there is no risk that connection is closed
this early.
I also renamed the small helper function and fixed a test that
had an improper `s.mu.Unlock()` in an error condition.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-10-21 14:53:03 -06:00
Derek Collison
df29f1fb50 Add detailed info on error for NextMsg() request
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-21 11:26:22 -07:00
Derek Collison
3b18f188ed Switched behavior to never refuse new request, and to alert when expiring ones with interest
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-21 10:35:29 -07:00
Derek Collison
705f8b6ed7 Do not forward service import messages to a stream export.
Addresses stack overflow issue wally was seeing with configs
that mix and match streams and services between each other.

Signed-off-by: Derek Collison <derek@nats.io>
2020-10-20 19:20:44 -07:00
Derek Collison
7fb22206f5 Allow AckNxt to also process a next request struct
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-20 16:45:54 -07:00
Derek Collison
c2b8de377c Formalize requests for next msg, support NoWait and Expires
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-20 16:25:19 -07:00
Matthias Hanel
2144f01f21 Adding support and an option for removal of jwt
To enable in full mode configure allow_delete: true
When enabled the file will be renamed to allow for manual restore.

In cache mode it will be enabled by default.
When enabled files will be deleted.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-10-20 16:45:11 -04:00
Derek Collison
a37f53e236 Updated tests for addition of ErrNoResponders
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-19 20:11:52 -07:00
Derek Collison
610d2d21b7 More robust waiting queue for pull mode consumers
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-19 19:51:46 -07:00
Ivan Kozlovic
ced31507a4 Bump version to 2.2.0-beta.26
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-10-19 17:07:51 -06:00
Matthias Hanel
f83280ccaf Fixed account update issue where signing key (and thus issuer) changes
Fix error and remove print from test.

Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-10-19 18:42:10 -04:00
Matthias Hanel
243361ac9a Incorporating readability suggestions
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-10-19 17:33:02 -04:00
Matthias Hanel
5a5dbb9dcd Fix nil deref when account is in bad/incomplete state
Signed-off-by: Matthias Hanel <mh@synadia.com>
2020-10-19 16:38:42 -04:00
Ivan Kozlovic
d6e420a996 Merge pull request #1652 from nats-io/fix_leafnode_accept_panic
[FIXED] Possible panic when server accepts TLS leafnode connection
2020-10-19 11:09:46 -06:00
Ivan Kozlovic
9bd088e0b9 Make it a small function
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-10-19 10:50:20 -06:00
Ivan Kozlovic
3b8d00e046 [FIXED] Possible panic when server accepts TLS leafnode connection
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-10-19 10:29:32 -06:00
R.I.Pienaar
ec606ebed2 add type hints num accounts message
Signed-off-by: R.I.Pienaar <rip@devco.net>
2020-10-19 12:01:11 +02:00
Derek Collison
923335e52d Merge pull request #1644 from nats-io/map
Traffic shaping and full wildcard support for streams and services exports/imports
2020-10-17 16:19:15 -07:00
Derek Collison
4af434e586 Allow mapping destinations to be parsed as singles and not force array syntax
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-17 08:21:02 -07:00
Derek Collison
cea8a0113d Use separate lock to pull cluster name for mapping
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-17 07:46:48 -07:00
Derek Collison
5f5ceb4668 Allow cluster filters for mappings, changed accountz for mappings
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-16 16:53:14 -07:00
Derek Collison
047600750a Make sure mappings to 0% turn off all traffic
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-16 14:23:47 -07:00
Derek Collison
04ffe3b00e Allow mapping destinations that introduce message loss (debugging, chaos monkey)
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-15 20:03:44 -07:00
Derek Collison
d0201d8b15 Added support for mappings in Accountz
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-15 19:14:58 -07:00
Derek Collison
4402a9cca0 Snapshot account but update at end of each readloop
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-15 15:52:43 -07:00
Derek Collison
e225acd179 Fix race accessing c.acc checking for mappings
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-15 14:02:39 -07:00