fe394bc0f6
[ #19 ] transformer: Optimize payload hashers a bit
...
```
name old time/op new time/op delta
Transformer/small-8 74.8µs ±11% 73.7µs ±15% ~ (p=0.529 n=10+10)
Transformer/big-8 1.38s ±11% 1.36s ± 4% ~ (p=0.796 n=10+10)
name old alloc/op new alloc/op delta
Transformer/small-8 7.69kB ± 0% 7.67kB ± 0% -0.21% (p=0.000 n=10+10)
Transformer/big-8 49.2kB ± 0% 49.0kB ± 0% -0.48% (p=0.004 n=10+10)
name old allocs/op new allocs/op delta
Transformer/small-8 102 ± 0% 101 ± 0% -0.98% (p=0.000 n=9+10)
Transformer/big-8 620 ± 1% 609 ± 0% -1.66% (p=0.000 n=10+10)
```
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-02-27 19:10:27 +03:00
51fedb5d3b
[ #19 ] transformer: Add a target which sends parts to a channel
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-02-27 19:10:27 +03:00
bf7e56c64d
[ #19 ] transformer: Do not reuse memory of sent objects
...
Slower, but more correct.
```
name old time/op new time/op delta
Transformer/small-8 72.4µs ± 8% 74.8µs ±11% ~ (p=0.278 n=9+10)
Transformer/big-8 1.31s ± 8% 1.38s ±11% +5.50% (p=0.035 n=10+10)
name old alloc/op new alloc/op delta
Transformer/small-8 7.39kB ± 0% 7.69kB ± 0% +4.04% (p=0.000 n=10+10)
Transformer/big-8 46.9kB ± 0% 49.2kB ± 0% +4.87% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
Transformer/small-8 94.6 ± 1% 102.0 ± 0% +7.82% (p=0.000 n=10+9)
Transformer/big-8 560 ± 0% 620 ± 1% +10.66% (p=0.000 n=10+10)
```
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-02-27 19:10:27 +03:00
f102456c74
[ #19 ] transformer/test: Check owner ID and payload hash for parts
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-02-27 19:10:27 +03:00
43987aae7a
[ #19 ] transformer/test: Add helper functions
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-02-27 19:10:27 +03:00
4917a71855
[ #19 ] transformer: Move EpochSource
to other types
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-02-27 19:10:27 +03:00
51bad6dfdb
[ #19 ] transformer: Merge formatter and payload splitter
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-02-27 19:10:27 +03:00
fb807e80ce
[ #19 ] transformer: Make writeChunk
non-recursive
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-02-27 19:10:27 +03:00
2af5889a05
[ #19 ] transformer: Simplify AccessIdentifiers
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-02-27 19:10:27 +03:00
1e1c836310
[ #19 ] transformer: Cover with unit-tests
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-02-27 19:10:27 +03:00
c2ea143d00
[ #19 ] object: Move transformer implementation from node
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-02-27 19:10:27 +03:00
f08069ceeb
[ #20 ] .github: Update CODEOWNERS
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-02-27 17:47:21 +03:00
dad99bad48
[ #20 ] .github: Drop go1.17, add go1.20
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-02-27 17:47:21 +03:00
0d3a238d9c
[ #5 ] pool: Update hashicorp/lru
to v2
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-02-24 17:32:40 +03:00
cf64ddfb14
[TrueCloudLab#13] pool: Renew token before it expired
...
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-01-30 15:06:02 +03:00
cf9a54dcda
[TrueCloudLab#11] pool: Fix handling SplitInfoError
...
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-01-23 11:07:29 +03:00
Denis Kirillov
b2a37543d3
[ #362 ] pool: Don't use default session token for read
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2023-01-13 13:21:29 +03:00
f0ac49b8f0
[TrueCloudLab#6] pool: Decrease rebalanceInterval
...
Set default rebalance interval to 15s
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-01-13 13:16:22 +03:00
54696acf48
[TrueCloudLab#6] pool: Log node healthy changing
...
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-01-13 13:16:22 +03:00
dd88a5c5e0
[ #4 ] go.mod: Bump supported go version to 1.18
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2022-12-30 13:40:50 +03:00
4ff9c00de3
[ #4 ] Rename NeoFS mentions in comments and method names
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2022-12-30 13:40:50 +03:00
b204a62da1
[ #4 ] go.mod: Update ANTLR
...
Current `go:generate` command was, probably, executed only on my laptop.
Replace it with explicit version, because package in the generated code
depends on in.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2022-12-30 13:40:50 +03:00
377a5a0517
[ #4 ] go.mod: Update dependencies
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2022-12-30 13:40:50 +03:00
43c046f343
[ #4 ] go.mod: Update neo-go to v0.100.1
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2022-12-30 13:40:50 +03:00
Denis Kirillov
8c0c7789ca
[ #365 ] pool: Add request callback
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2022-12-29 16:34:13 +03:00
Evgenii Stratonikov
339e2702f8
[ #367 ] client: Allow to override key in Object.Hash RPC
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2022-12-29 16:34:13 +03:00
Pavel Karpy
a1748ae0e7
[ #370 ] bearer, session: Clarify expiration epoch
...
The expiration epoch is the _last_ valid epoch for an entity. Also, clarify
the expiration epoch meaning for tombstones and regular objects.
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2022-12-29 16:34:13 +03:00
Pavel Karpy
4c779423f5
Move to frostfs-sdk-go
...
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2022-12-14 09:59:29 +03:00
Pavel Karpy
45a6e7a7c2
[ #369 ] status: Make errors return default messages
...
Use default messages in `Error` methods like in `ToStatusV2`.
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2022-12-14 09:59:29 +03:00
Denis Kirillov
b4b07a3c4e
[ #364 ] pool: Adopt client stream timeout param
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-11-15 17:08:20 +03:00
Denis Kirillov
d047289182
[ #360 ] object: Add new package relations
...
Package relations provides feature to process inner object structure.
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-11-14 17:46:17 +03:00
Denis Kirillov
1cacf472a3
[ #360 ] pool: Fix removing virtual object
...
Include phy objects in session token scope
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-11-14 17:46:17 +03:00
Denis Kirillov
e35f0df1ca
[ #358 ] pool: Make ErrPoolClientUnhealthy unexported
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-11-09 10:22:33 +03:00
Denis Kirillov
5f9d846fb4
[ #358 ] pool: Don't init session with dead node
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-11-09 10:22:33 +03:00
Denis Kirillov
2eefdab0e4
[ #358 ] pool: Start even if not all node healthy
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-11-09 10:22:33 +03:00
Denis Kirillov
7a2a76af95
[ #356 ] ns: Use domain instead of name in NNS resolver
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-10-28 12:24:56 +04:00
Evgenii Stratonikov
da4ddcf337
[ #353 ] netmap: Get rid of ioutil
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-10-19 12:05:49 +04:00
Evgenii Stratonikov
231ec66054
[ #353 ] go.mod: Update external dependencies
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-10-19 12:05:49 +04:00
Evgenii Stratonikov
a02a3870a5
[ #353 ] go.mod: Update neofs-api-go to v2.14.0
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-10-19 12:05:49 +04:00
Evgenii Stratonikov
9d4b36a8e6
[ #353 ] go.mod: Update neo-contract to v0.16.0
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-10-19 12:05:49 +04:00
Evgenii Stratonikov
d3a09cbe7f
[ #353 ] go.mod: Update neo-go to v0.99.4
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-10-19 12:05:49 +04:00
anastasia prasolova
f21d63bded
Add CODEOWNERS file
...
Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
2022-10-16 21:06:24 +03:00
21eef1ae7f
[ #351 ] Add StringifyPublicKey method for NodeInfo
...
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2022-10-13 10:27:18 +03:00
Leonard Lyubich
d2f3929b51
[ #349 ] client: Use context.Background
in Dial
by default
...
Passing `nil` context to `rpc.Balance` leads to panic. To prevent panic,
we need to provide some default context in `Dial`.
Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
2022-10-12 17:50:55 +04:00
Leonard Lyubich
8c682641bf
[ #343 ] pool: Provide dial context to clients
...
After recent changes `client.Client` accepts dial context. There is a
need to forward the context passed into `Pool.Dial` to the underlying
`Client` instances.
Define type aliases of different client constructors: context-based and
non-context. Use context-based constructor in `Pool`. Pass `ctx`
parameter of `Pool.Dial` method to the client builder.
Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
2022-10-07 13:24:02 +03:00
Leonard Lyubich
452a50e9d5
[ #343 ] client: Accept context parameter in Dial
...
In previous implementation of `Client.Dial` there was no ability to
specify parent context (e.g. global application context).
Add `PrmDial.SetContext` method which accepts optional base dial
context. Use the context to open client connection or fall back to using
`context.Background()`.
Upgraded version of `github.com/nspcc-dev/neofs-api-go/v2` module
also fixes the problem when dial timeout didn't work properly.
Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
2022-10-07 13:24:02 +03:00
Leonard Lyubich
1325b4f272
[ #336 ] session: Support group object sessions
...
Rename `LimitByObject` method of the `session.Object` type to
`LimitByObjects` and make it to accept variadic parameter.
Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
2022-10-05 13:39:51 +04:00
Evgenii Stratonikov
c6576c8112
[ #344 ] netmap: Support ExternalAddr
well-known attribute
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-09-26 13:28:39 +03:00
Leonard Lyubich
8e3173eacd
[ #270 ] client/netmap: Cover NetMapSnapshot
with unit tests
...
There is a need to test each `Client` operation. In previous
implementation `Client` was based on real socket connection. This didn't
allow to test the `Client` without OS resources. In order to write
convenient and useful unit tests we need to slightly refactor the code.
Introduce `neoFSAPIServer` interface as a provider of `Client` type's
abstraction from the exact NeoFS API server. Add `netMapSnapshot` method
for initial implementation. Define core interface provider used in real
code. Set `coreServer` as an underlying `neoFSAPIServer` in
`Client.Dial`. Cover `Client.NetMapSnapshot` method with unit tests
using the opportunity to override the server.
From now client library can be tested not only with real physical
listeners but with imitations.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-09-22 10:51:07 +04:00
Leonard Lyubich
89124d442d
[ #312 ] client/netmap: Simplify NetMapSnapshot
implementaiton
...
Make flat set of instructions similar to `ObjectDelete` operation.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-09-22 10:51:07 +04:00