39 Commits

Author SHA1 Message Date
Piotr Piotrowski
9d1be0347a [FIXED] Ensure object watcher stop closes the updates channel (#1844)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2025-04-03 14:02:33 +02:00
Tomasz Pietrek
52a2d33b79 [IMPROVED] Bind Streams in Object Store Watchers (#1578)
When mirroring Object Store, there is a need to setup subject
transformations. However, client also needs to bind to the stream
to avoid stream lookup, which is both not necessary and expensive,
and also does not work with Object Store mirrors.

Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
2024-03-04 17:13:43 +01:00
dmitryabramov-f3
21d3482779 [IMPROVED] Bind Object Store bucket stream when getting object. (#1568)
The change is needed to properly operate on mirrored object store buckets.
By binding stream nats.go does not need to search for stream by subjects (which does not work for mirrors).
2024-03-03 16:41:41 +01:00
Samuel Attwood
f7c1fe9992 [FIXED] Add missing object store compression struct tag (#1559) 2024-02-20 16:42:55 +01:00
Johannes Bareuther
1c24aa7e50 [ADDED] Compression option for object store buckets (#1544)
Signed-off-by: Johannes Bareuther <40851416+johbar@users.noreply.github.com>
2024-02-08 13:58:29 +01:00
Joachim Bauch
d7fda7d0cc [IMPROVED] Fix typos in comments. (#1547)
Signed-off-by: Joachim Bauch <bauch@struktur.de>
2024-02-07 21:22:19 +01:00
Piotr Piotrowski
ad97d94c44 [ADDED] Timestamp fields to stream and consumer infos (#1540)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2024-01-30 14:15:20 +01:00
Piotr Piotrowski
224a54485a [FIXED] Set read deadline in object store to a configurable value (#1531)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2024-01-26 23:48:41 +01:00
Sasha Melentyev
98430acd80 [IMPROVED] Use errors.Is for err handling, and use skipped bool (#1500)
Signed-off-by: Sasha Melentyev <sasha@m8.ru>
2024-01-11 16:36:58 +01:00
Piotr Piotrowski
245bd2bf5f [FIXED] Handle several ignored errors (#1496)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-12-15 14:00:12 +01:00
Piotr Piotrowski
b868e2a2d6 Update dates in licence headers (#1445)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-10-17 18:44:27 +02:00
Piotr Piotrowski
92ffbb1fde [ADDED] Object store and object metadata (#1385)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-09-20 08:21:33 +02:00
Piotr Piotrowski
f1601bd4ab Remove experimantal notice from object store (#1399)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-09-12 22:22:51 +02:00
Piotr Piotrowski
ac8a43f826 Object store compatibility tests (#1373)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
Co-authored-by: Tomasz Pietrek <tomasz@nats.io>
2023-08-28 14:38:19 +02:00
Piotr Piotrowski
33a61edea9 [ADDED] UpdatesOnly() option for object store watchers (#1378)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-08-28 12:43:25 +02:00
Piotr Piotrowski
3af379dccf [ADDED] KV implementation in new JetStream API (#1362)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-08-25 12:36:54 +02:00
Anthony Jacques
00df958187 [FIXED] Fix race condition in object store get with nats context
Close #1313
2023-06-13 16:02:48 -07:00
Piotr Piotrowski
d2c31e4f78 [FIXED] Cleanup reply sub after putting object (#1282)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-06-06 23:29:45 +02:00
Piotr Piotrowski
b31e5f64c5 Merge branch 'main' of https://github.com/nats-io/nats.go into jsv2
Improve readme

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>

Fix msg size calculation

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>

Add connection event listeners

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>

Fix leaky goroutines in tests

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-05-23 12:04:01 +02:00
Piotr Piotrowski
c8b7b4bfa3 Move parse.go to internal directory 2023-05-23 11:56:26 +02:00
Piotr Piotrowski
c3cae07eeb [FIXED] Object store context put and get issues (#1260)
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
2023-05-04 08:45:02 +02:00
Piotr Piotrowski
334dddcbee Add tests for parse.go 2023-04-25 12:11:20 +02:00
Piotr Piotrowski
7d2279078e Change listing KVs and object stores to return status (#1099) 2022-10-12 19:41:50 +02:00
Piotr Piotrowski
f4102422df [CHANGED] Hide deleted objects by default (#1091) 2022-09-21 20:08:47 +02:00
Piotr Piotrowski
2930f1c0e9 [UPDATED] Add tests for calculating object digest (#1076) 2022-09-16 17:49:00 +02:00
Piotr Piotrowski
51ba8b3b89 Allow updating meta if new name exists but is deleted (#1053) 2022-09-15 14:04:54 +02:00
Piotr Piotrowski
225c55795f [ADDED] Listing buckets and bucket names (#1074) 2022-09-15 14:00:37 +02:00
Scott Fauerbach
84e2c74b56 Link not allowed in put meta (#1057) 2022-09-01 14:06:28 +02:00
Piotr Piotrowski
6761fc3b77 Fix hash decoding in object store, propagate errors from Get() correctly (#1052) 2022-08-24 21:51:08 +02:00
Scott Fauerbach
cc640fefe3 Object store add link changes and refactoring (#883)
* Add link changes and some refactoring

* Remove test skipping on Windows

* Allowed to add a bucket/link over a bucket/link

Co-authored-by: Jean-Noël Moyne <jnmoyne@users.noreply.github.com>
Co-authored-by: jnmoyne <jnmoyne@gmail.com>
2022-08-23 20:13:57 +02:00
Quentin
9654d96ff3 Update object Put to avoid loosing last chunk
The old code might miss the last object if `Reader` return both a value and `EOF`

Extract from `Reader` doc :
> When Read encounters an error or end-of-file condition after successfully reading n > 0 bytes, it returns the number of bytes read. It may return the (non-nil) error from the same call or return the error (and n == 0) from a subsequent call. An instance of this general case is that a Reader returning a non-zero number of bytes at the end of the input stream may return either err == EOF or err == nil. The next Read should return 0, EOF.
>
> Callers should always process the n > 0 bytes returned before considering the error err. Doing so correctly handles I/O errors that happen after reading some bytes and also both of the allowed EOF behaviors.
2022-06-09 18:59:10 +02:00
Piotr Piotrowski
39c636d32f Add support for enhanced stream purge in JetStream 2022-06-06 13:53:25 +02:00
Colin Sullivan
eb82aedd14 add maxbytes
Signed-off-by: Colin Sullivan <colin@synadia.com>
2022-04-11 18:34:19 -06:00
Derek Collison
3b8c93b4f8 Allow KV and Obj to specifiy placement
Signed-off-by: Derek Collison <derek@nats.io>
2022-03-16 14:00:53 -07:00
Phil Pennock
bf1b00513e Spelling fixes, mostly comments
The new `gospel` tool, <https://github.com/kortschak/gospel>, uses hunspell
libraries but pre-registers as acceptable words every symbol from the Go
source, massively reducing the noise and making comment spell-checking a
tractable problem.  It recently gained support for a `.words` file located in
the same directory as the `go.mod` file, to define local words.  With this, we
can fix real issues too.

This PR reduces the complaints down to 4:
 1. A reference to `syncSubscribers` which I can't figure out
 2. A reference to a `pubArg`
 3. Two references to `splitArgs`.

I made two actual code changes:
 1. Fixing a **non-exported** const type for consistency with all the others:
    `apiStreamList` -> `apiStreamListT`.
 2. Changing an error message to refer to a field which exist

Lots of typo fixes; references to since-renamed fields; etc.

A reference to `PublishAsynMsg` might have been intended to be
`PublishAsyncMsg` but that doesn't exist either, so I removed it.
Similarly, `SubjectIsDelivery` lived briefly but a stale reference was left in
a comment, so I removed that.

To reproduce:

    go install github.com/kortschak/gospel@latest
    gospel .
2022-02-05 21:26:46 -05:00
Derek Collison
5d193abdc4 Increade object read deadline
Signed-off-by: Derek Collison <derek@nats.io>
2021-10-18 08:57:32 -07:00
R.I.Pienaar
a512063b21 reimplement object status to avoid unspecified maps
Signed-off-by: R.I.Pienaar <rip@devco.net>
2021-10-13 16:40:47 +02:00
R.I.Pienaar
4b5b7cfbc1 add kv and object status functionality
Signed-off-by: R.I.Pienaar <rip@devco.net>
2021-10-12 16:54:44 +02:00
Derek Collison
141643a344 [ADDED] KeyValue and ObjectStore support for JetStream.
Also:
- Fixed message reply in PublishMsgAsync
- Ability to seal streams
- Ability for consumer to get message headers only, no msg payload
- GetLastMsg and purgeStream by subject

Signed-off-by: Derek Collison <derek@nats.io>
2021-10-07 16:29:26 -06:00