Commit Graph

2026 Commits

Author SHA1 Message Date
Derek Collison
d358aaddf6 Fixes for filestore not remember first sequence when all messages deleted.
Thsi fixed a few minor bugs as well as the one where we did not remember our sequence numbers.

Signed-off-by: Derek Collison <derek@nats.io>
2020-11-17 15:04:57 -08:00
Derek Collison
67f4bf1ac1 Make sure to honor MaxAckPending when streaming directly to consumers
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-16 16:51:34 -08:00
Derek Collison
0156bea49a Merge pull request #1712 from nats-io/sendq
Decouple consumer from using stream's sendq.
2020-11-16 07:49:18 -08:00
Derek Collison
ce42addfe4 Merge pull request #1711 from nats-io/stream_lookup
Allow stream lookup by subject.
2020-11-16 05:59:13 -08:00
Derek Collison
cccb96097a Release lock for sending non-consumer messages as well
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-16 05:29:55 -08:00
Derek Collison
e93f448d32 Decouple consumer from using stream's sendq
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-15 15:26:30 -08:00
Derek Collison
5ff28b6087 Allow stream lookup by subject.
Allow an API endpoint and public API to lookup a stream by subject. The subject needs to be an exact match or a subset. If the subject is considered a filtered subject for the stream that will also be returned.

Signed-off-by: Derek Collison <derek@nats.io>
2020-11-14 13:35:05 -08:00
Derek Collison
9893aac8cb Add support for MaxAckPending
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-14 06:28:07 -08:00
Derek Collison
28cb4e8c34 Fix bug when removing the same message from a stream.
We would release locks and call into upper layers when removing a message. The upper layers may call back into the lower layers to get more information, such as the subject.
This fix has the storage updates optionally supply the subject for filtered consumers and fixes the bug of double deletes.

Signed-off-by: Derek Collison <derek@nats.io>
2020-11-13 17:05:24 -08:00
Derek Collison
2696749bb2 fix
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-12 13:58:34 -08:00
Derek Collison
cd03482ccb Fixed bug when returning wrong error from LoadMsg and a race condition
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-12 13:38:08 -08:00
Derek Collison
e6797efde7 Make interest notifications explicit match only
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-12 07:10:47 -08:00
Derek Collison
a733c12086 Fix flapper, be pedantic about signaling on delivery subject update
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-11 18:07:51 -08:00
Derek Collison
c6e2aa0ba6 Merge pull request #1702 from nats-io/split
Remove conditional and broadcast for signalling consumers
2020-11-11 14:02:56 -08:00
Derek Collison
e31001a782 Remove conditional and broadcast for signalling consumers
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-11 13:53:45 -08:00
Derek Collison
39638edfb4 Bumped beta version 2020-11-11 12:05:11 -08:00
Derek Collison
164f9fdf2b Updates to consumer store to support delta updates.
In preparation for clustering we need to have the consumer filestore update state with deltas vs original design.

Signed-off-by: Derek Collison <derek@nats.io>
2020-11-10 19:16:55 -08:00
Derek Collison
84591c1e16 Bumped version
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-10 17:43:54 -08:00
Derek Collison
21a35546c1 Updates to index cache handling for message blocks.
We can have partial caches and we can also remove the idx cache. This was causing a bug where we would get the wrong slotInfo from the cache.idx. This code fixes the bug and detects idx partials.

Signed-off-by: Derek Collison <derek@nats.io>
2020-11-10 12:49:00 -08:00
Derek Collison
dc40ba6197 Merge pull request #1694 from nats-io/consumer_update
Redeliver pending
2020-11-05 15:01:22 -08:00
Derek Collison
a4abbea0d2 Make sure to set timer for additional redeliveries
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-05 14:07:17 -08:00
Derek Collison
4a26b1f514 Redeliver pending right away on change of delivery subject for a consumer.
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-05 13:20:27 -08:00
Derek Collison
34a6aa8814 Bumped beta version 2020-11-05 07:35:57 -08:00
Derek Collison
67b1a33401 Fix for partial cache overwrite bug.
When we moved to a write through cache architecture we also moved the cache write to offset based instead of APPEND.
We were inadvertently clearing our offset from our cache when we would clear which meant if the next operation was another write we would have the wrong offset and overwrite previous messages.

Signed-off-by: Derek Collison <derek@nats.io>
2020-11-04 20:01:53 -08:00
Ivan Kozlovic
ffd476357e [CHANGED] Gateway connections now always send PINGs
Connections normally suppress sending PINGs if there was some
activity. We now force GATEWAY connections to send PINGs at the
configured interval or 15 seconds, whichever is the smallest.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-11-03 13:13:09 -07:00
Derek Collison
d737ccef55 Merge pull request #1685 from nats-io/fs
Update to write architecture and bug fixes and stability improvements.
2020-11-02 08:59:28 -08:00
R.I.Pienaar
c0f031cc39 support next structure in acknxt
Signed-off-by: R.I.Pienaar <rip@devco.net>
2020-11-02 17:47:19 +01:00
Derek Collison
d80dd43e88 Set in flusher state inside spinup function
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-02 08:37:02 -08:00
Derek Collison
1f8ec6c964 Separate out disk available for Windows
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-31 12:56:27 -07:00
Derek Collison
93ebcafca1 Update to write architecture and bug fixes and stability improvements.
We had a left over artifact from the shared write buffer architecture
where the filestore was still controlling the flush loop for the special
last message block. This changes it such that each message block is running
their own flush loop.

Signed-off-by: Derek Collison <derek@nats.io>
2020-10-31 12:08:55 -07:00
Derek Collison
c5657d750b Bumped version. 2020-10-31 12:06:20 -07:00
R.I.Pienaar
96c53b77f5 Merge pull request #1683 from ripienaar/bare_acknxt
ensure bare AckNxt requesting >1 is supported
2020-10-30 16:15:20 +01:00
R.I.Pienaar
bf68068fa6 address review
Signed-off-by: R.I.Pienaar <rip@devco.net>
2020-10-30 15:27:42 +01:00
R.I.Pienaar
0e9ca7614f ensure bare AckNxt requesting >1 is supported
Signed-off-by: R.I.Pienaar <rip@devco.net>
2020-10-30 14:46:39 +01:00
Derek Collison
5270f2da46 Merge pull request #1682 from nats-io/filter_interest
Would not properly handle wildcard streams with interest retention and filtered consumers
2020-10-29 14:08:14 -07:00
Derek Collison
6232e4b150 Lock access updates.
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-29 14:04:28 -07:00
Derek Collison
cce7195a2c Fixed bug that would not properly handle wildcard streams with interest retention and filtered consumers.
Signed-off-by: Derek Collison <derek@nats.io>
2020-10-29 13:14:17 -07:00
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