Derek Collison
4c91b69c4f
Merge pull request #1413 from nats-io/fix_flappers
...
Fix flappers
2020-05-26 09:01:04 -07:00
Derek Collison
710ef00383
Don't allow JetStream on system account. Warn when accounts configured but no JS
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-25 12:17:18 -07:00
Derek Collison
3caf6265d4
Properly recover ephemeral consumers after restart
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-25 11:06:55 -07:00
Derek Collison
54aa40b352
Wait a bit longer to get subs
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-25 09:30:36 -07:00
Derek Collison
9dae2cd80f
Fixed flapper, will fix bug in other PR
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-25 06:58:23 -07:00
Derek Collison
b26d389d5e
Use old request style, no pause between new sends
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-25 06:58:23 -07:00
Ivan Kozlovic
e976e63099
Fixing some flappers
...
Signed-off-by: Ivan Kozlovic <ivan@synadia.com >
2020-05-25 06:58:23 -07:00
Derek Collison
dae309ee30
Fix flapper, wait for no clients
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:33:06 -07:00
Derek Collison
7b6352c991
Add timestamps to stream state for first and last, addresses #1396
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:33:06 -07:00
Derek Collison
5b369ad7dc
Do not allow streams to overlap with our public API - https://github.com/nats-io/jetstream/issues/137
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:33:06 -07:00
R.I.Pienaar
7a1ec0ad27
adds API type hints to responses
...
Also standardise some names of response structures and create
reusable types that can be included into others to construct
our standard API requests and responses.
Fixes some json tags.
Updates the design document of the JSON responses to reflect
the implementation that was done
Signed-off-by: R.I.Pienaar <rip@devco.net >
2020-05-19 14:33:06 -07:00
Derek Collison
3a30ef34b7
Make file state cleanup consistent for all JetStream tests
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:33:06 -07:00
Derek Collison
e9b9788fbe
Various bug fixes, fixes for flappers
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:33:06 -07:00
Derek Collison
585fa8cc89
Test fails under race flag, so scale back
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:31:56 -07:00
Derek Collison
37b8988643
Return 404 codes when resources are not found
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:27:45 -07:00
Derek Collison
d36dff7d2f
Move list to names, and add list in for detailed info for streams and consumers
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:27:45 -07:00
Derek Collison
5256781ba0
Addressed issues raised in https://github.com/nats-io/nats-server/pull/1369
...
API still only turned on for account info in disabled accounts. Issues with advisories. Plan is still to have all endpoints on in all accounts.
Stream list and Consumer list return names only, page limit increased to 1024.
Stream, Consumer and Template names limited to 256 for now.
Subject API for stream messages, delete and get, not have STREAM.MSG.
Subject API for Durable is now CONSUMER.DURABLE.
Subject API for Templates now STREAM.TEMPLATE.
All subject APIs for list reverted back, so STREAM.LIST, CONSUMER.LIST etc.
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:27:45 -07:00
Derek Collison
cadd39a01c
Major rewrite for NATS JetStream API
...
API made more consistent. Noun followed by verb.
Name arguments in request subejcts are always at the end now.
Remove enabled call, just use account info.
Getting a message directly from a stream is treated like an admin API and requires JSON request.
Deleting a message directly as well.
StreamList and ConsumerList now include details and support paging.
Streams and Consumers now contain a created field in their info.
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:27:45 -07:00
Derek Collison
5ffb500857
Be more forgiving on empty api requests, force json request for delete msg api
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:26:46 -07:00
Derek Collison
cd5ec0f2e1
Move enabled to Enabled vs JetStream in response
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:26:46 -07:00
Derek Collison
513bff051b
Redesign message-based API
...
Removed usage of +OK and -ERR. All responses are valid json objects now and optionally can include an ApiError which will have Code and Description.
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:26:46 -07:00
Derek Collison
7f41b5a6ae
Added support for DiscardPolicy on streams
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:26:46 -07:00
Derek Collison
50443ead89
Change to consumer info, removed state, made pending and redelivery counts
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:26:46 -07:00
Derek Collison
7d7a9e8f23
Make sure messages are not redelivered if ack'd late (pull-based this can happen)
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:26:46 -07:00
Derek Collison
0bf6b2afbc
Allow addition of streams and consumers (durables) with same config to be acceptable
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:26:46 -07:00
R.I.Pienaar
fb37c121d1
expose the arrival timestamp in the message metadata
...
Signed-off-by: R.I.Pienaar <rip@devco.net >
2020-05-19 14:21:27 -07:00
Derek Collison
0a36706958
PubAck details that provide stream name and sequence assigned
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:21:27 -07:00
Derek Collison
4139777ea8
First pass at account config for jetstream server reload support
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:21:27 -07:00
Derek Collison
b5daac9638
Properly parse and use jetstream server config
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:21:27 -07:00
Derek Collison
ec0bc1dbec
First pass account configuration for jetstream
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:21:27 -07:00
Derek Collison
1394a7118d
Breaking change to upgrade ConsumerConfig for consumer creation.
...
This is a breaking change and will not be able to restore consumer's from a filestore when upgraded.
We are getting close to settling on the API an once that happens we will not be introducnig any
breaking changes.
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:20:02 -07:00
Derek Collison
ffae57e20e
Fold replay original logic into main loop, fixed pull bug on replay original
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:20:02 -07:00
Derek Collison
2d94caee87
Fix for https://github.com/nats-io/jetstream/issues/144
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:18:34 -07:00
Derek Collison
4a30f593bd
Fix for https://github.com/nats-io/jetstream/issues/143
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:18:34 -07:00
Derek Collison
0b970130b0
Allow filter subjects to have wildcards. Fix for https://github.com/nats-io/jetstream/issues/136
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:18:34 -07:00
Derek Collison
3c1dcd2401
Remove pull based consumers that are no longer valid or have registered interest
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:18:34 -07:00
Derek Collison
4774d41f9d
Fixes for filestore consistency on server restarts under heavy load with purge operations
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:18:34 -07:00
Derek Collison
ade58bea87
Do not deadlock when triggering lots of didNotDeliver notices. Don't hold lock on chan send
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:18:34 -07:00
Derek Collison
323b3d0b11
Beginning basics for stream and consumer snapshotting
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:18:34 -07:00
Derek Collison
df774e44b0
Rework how service imports are handled to avoid performance hits
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:18:34 -07:00
Derek Collison
3ab76a6dcd
Write performance tweaks
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:16:03 -07:00
Derek Collison
3d80ff71a4
Fix for queue subscribers as consumers
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:16:03 -07:00
Derek Collison
5e9f487b61
Fixes for test and locking, bumped version
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:16:03 -07:00
Derek Collison
4a46a92cea
Redesigned file storage engine.
...
The old engine was a simple design to get us started but had a single lock and held that lock around I/O.
This design allows message blocks to have the own RW locks and operate independently and to also not hold
locks while doing most I/O.
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:16:03 -07:00
Derek Collison
623fa5ccec
Impl for GetSeqFromTime for FileStore was missing
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:16:03 -07:00
Derek Collison
c9d3bdd5ab
Added Stream Update abilities for certain properties
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:16:03 -07:00
Derek Collison
8d1f3cc7c2
Allow JetStream consumers to work across multi-server hops
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:16:03 -07:00
Derek Collison
d5aa55a103
Audit advisories, work based off of #1253 from ripienaar
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:16:03 -07:00
Derek Collison
5c99355fa5
Separate out consumer API for Durable vs Ephemeral
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:16:03 -07:00
Derek Collison
cd052a42d6
Fix for non-js msg failed delivery stopping normal subscribers
...
Signed-off-by: Derek Collison <derek@nats.io >
2020-05-19 14:16:03 -07:00