Denis Kirillov
3824151699
[ #616 ] Reduce number of requests during listing
...
Check if object is directory before request to NeoFS
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-08-16 13:47:37 +03:00
Denis Kirillov
94a6a55919
[ #595 ] Move decrypter to separate package
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-08-13 10:26:00 +03:00
Denis Kirillov
87c05eb514
[ #595 ] Add SSE with customer key
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-08-13 10:26:00 +03:00
Angira Kekteeva
f66e4a77cd
[ #577 ] Add IsDeleteMarker() to NodeVersion
...
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-08-09 17:20:40 +04:00
Angira Kekteeva
2a933f48be
[ #577 ] Remove redundant set of isLatest
...
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-08-09 17:20:40 +04:00
Angira Kekteeva
245e64900d
[ #577 ] Replace ObjInfo with ExtObjInfo in cache
...
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-08-09 17:20:40 +04:00
Angira Kekteeva
37c46e926e
[ #577 ] Add Version() to ExtendedObjectInfo
...
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-08-09 17:20:40 +04:00
Denis Kirillov
5dd658302d
[ #612 ] Fix comment
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-26 17:36:21 +03:00
Denis Kirillov
b2e8b1cfb3
[ #612 ] Make listing more robust
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-26 17:36:21 +03:00
Angira Kekteeva
4483c6f57a
[ #619 ] Filter system metadata
...
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-07-26 15:37:13 +03:00
Alex Vanin
e0136feb73
[ #611 ] Split name processing from object info creation procedure
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-07-25 14:23:30 +03:00
Alex Vanin
97f81d3270
[ #611 ] Process delimiters on the object info cache hit
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-07-25 14:23:30 +03:00
Denis Kirillov
85eacdb970
[ #602 ] Fix removal non-empty bucket
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
0057f6b7db
[ #546 ] Add size and etag in nodeVersionInfo
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Angira Kekteeva
72013e08ec
[ #569 ] Refactor versioning in tree service
...
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
88c392d024
[ #490 ] Optimize GetObjectTaggingAndLock
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
c88a9842db
[ #488 ] Sync using oid.ID
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
85c203e157
[ #488 ] Sync using cid.ID
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
42a761c1f2
[ #547 ] Cache ObjectInfo instead of Object
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
5984f2c2bc
[ #525 ] Add comment to clarify anonymous func
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
ad95d1745c
[ #525 ] Parallelize listing
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
12a2060dd0
[ #524 ] Optimize listing
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Alex Vanin
4f3d206422
[ #478 ] Don't fetch epoch at object upload
...
Creation epoch was used for versioning. With
tree service, versioning is done on the NeoFS
side in the tree.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
a02900a4f7
[ #474 ] Use appropriate null version during listing
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
9b1ccd39be
[ #475 ] Add extra attributes to partInfo
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
1a456eaa8b
[ #452 ] Remove unused
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
9fb3fb1274
[ #452 ] Fix versions tests
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
dd534e8738
[ #451 ] Handle lock objects using tree service
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
70957d75fd
[ #417 ] Complete multipart upload using tree service
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
9c74cca9af
[ #420 ] Using tree service to list object versions
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
25477cdaf8
[ #416 ] Use tree service to list objects
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
37b1baed41
[ #413 ] Refactor
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
977f176713
[ #413 ] Use tree service to delete object
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
49bd77d9cf
[ #413 ] Use tree service to head objects
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
36f3c43af5
[ #413 ] Use tree service to put object
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-22 15:19:16 +03:00
Denis Kirillov
9f740b9683
[ #289 ] Add detect mimetype by extension
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-06-29 19:13:16 +03:00
Denis Kirillov
7ca519cb32
[ #539 ] Add context to errors
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-06-27 02:23:19 +04:00
Denis Kirillov
f00ca1b6c4
[ #438 ] Drop layer/neofs package
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-06-07 13:59:45 +03:00
Angira Kekteeva
e904ed51c7
[ #487 ] Optimize bucketInfo in initObjectPayloadReader
...
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-06-03 10:57:56 +03:00
Angira Kekteeva
4767eeed8c
[ #487 ] Remove attach of bearer token
...
When bucket owner is not an issuer of the bearer token
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-06-03 10:57:56 +03:00
Alex Vanin
12d9eb62cb
[ #489 ] Sanitize log records that may contain user input
...
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-06-02 19:42:31 +04:00
Denis Kirillov
933ef2bc71
[ #441 ] Remove unused
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-05-31 14:48:58 +03:00
Denis Kirillov
2bca4755f9
[ #441 ] Optimize put objects
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-05-31 14:48:58 +03:00
Leonard Lyubich
087d500c5f
[ #458 ] *: Refactor working with NeoFS identities
...
Pull latest changes from NeoFS SDK Go library. Decrease redundant and
unsafe usage of ID pointers. Use `EncodeToString` method in order to
calculate protocol strings.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-05-27 17:22:37 +04:00
Alex Vanin
385437aace
[ #441 ] Don't produce extra object.Head request at regular object upload
...
Hash can be calculated locally in S3 gateway.
Creation epoch used for versioning and will be
fetched during get and list requests. To avoid
conflicts, put method do not update cache anymore.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-05-20 10:56:36 +03:00
Alex Vanin
b778c2e072
[ #431 ] Fix ETag value
...
ETag is a string with SHA256 of NeoFS object payload.
Hash is taken from object header by neofs-sdk-go getter.
Checksum type in neofs-sdk-go has changes `String()`
output from `<hash>` to `SHA256:<hash>` in latest update.
S3 gateway should not be relied on unstable string format
implementations and use raw value.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-05-12 21:19:59 +04:00
Denis Kirillov
e3c16a32dd
[ #409 ] Update SDK
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-04-26 12:51:52 +04:00
Denis Kirillov
6e91074b50
[ #367 ] Check errors using status
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-04-22 15:30:42 +04:00
Denis Kirillov
3c5c2f20d8
[ #399 ] Use bearer token for system objects
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-04-13 16:44:32 +04:00
Denis Kirillov
f0914b8a43
[ #377 ] Reuse BucketInfo in layer
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-29 02:43:28 +04:00
Denis Kirillov
32e83db064
[ #195 ] Set Lock type to system lock objects
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
13080d6d96
[ #195 ] Refactor TestNeoFS
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
6cf01bed14
[ #195 ] Add tests
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
7d6271be8a
[ #195 ] Implement PUT, GET locks to certain object
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
8553158b81
[ #195 ] Add handling lock headers for PUT and COPY
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-23 14:32:13 +04:00
Denis Kirillov
02f4524d67
[ #368 ] Unify cache value deletion
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-16 10:59:42 +03:00
Leonard Lyubich
8fb3835250
[ #346 ] api: Do not use io.Pipe
in CompleteMultipartUpload
...
Replace `layer.objectWritePayload` method with `initObjectPayloadReader`
which returns `io.Reader` of the object payload. Copy payload data to
the parameterized `io.Writer` in `layer.GetObject`. Remove `io.Pipe`
from `CompleteMultipartUpload` implementation and build analogue of
`io.MultiReader` for the part list.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-04 00:14:30 +03:00
Leonard Lyubich
cd64f41ce8
[ #346 ] *: Refactor communication with NeoFS at the protocol level
...
Make `tokens`, `authmate` and `layer` packages to depend from locally
defined `NeoFS` interface of the virtual connection to NeoFS network.
Create internal `neofs` package and implement these interfaces through
`pool.Pool` there. Implement mediators between `NeoFS` interfaces and
`neofs.NeoFS` implementation.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-04 00:14:30 +03:00
Leonard Lyubich
34a221c5c9
[ #346 ] Upgrade NeoFS SDK Go library
...
Core changes:
- `object.ID` moved to new package `oid`;
- `object.Address` moved to new package `address`;
- `pool.Object` interface changes.
Additionally:
- Set container owner in `Agent.IssueSecret`.
- Remove no longer needed fields from `GetObjectParams`
- `Length` and `Offset` are never assigned. These values
are set in `Range` field.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-04 00:14:30 +03:00
Angira Kekteeva
1502857dba
[ #313 ] Remove extra QueryUnescapes
...
Removed extra QueryUnescapes in search and objectPut
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2022-01-27 10:25:11 +03:00
Denis Kirillov
f5d365af1d
[ #319 ] Update CRDT headers
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-26 16:22:58 +03:00
Denis Kirillov
58df410111
[ #319 ] Head and delete null versions
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-26 16:22:58 +03:00
Denis Kirillov
962d136e73
[ #308 ] Correct access denied status code
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-24 18:47:03 +03:00
Denis Kirillov
c202893563
[ #307 ] Filter system metadata
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-01-21 10:28:51 +03:00
Angira Kekteeva
d6f0ab8ea4
[ #186 ] Fix versioning issues in UploadPart
...
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-11-30 11:32:59 +03:00
Angira Kekteeva
284a560ea6
[ #186 ] Refactor objectSearch, fix objectPut
...
Fixed panic in objectPut() if input reader is nil
Made objectSearch searching by any attribute
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-11-30 11:32:59 +03:00
Denis Kirillov
d36dfe8c61
[ #271 ] Update neo-sdk-go to the latest version
...
Refactoring invoking pool methods for anonymous requests.
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-11-16 14:42:08 +03:00
Denis Kirillov
ae87effb28
[ #271 ] Add random key for no sign requests
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-11-16 14:42:08 +03:00
Angira Kekteeva
7d0bc1e992
[ #217 ] Add CORS support
...
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-10-12 09:03:09 +03:00
Angira Kekteeva
ccf5db95a5
[ #217 ] Refactor system objects
...
Moved into a separate file
getSystemObject renamed to headSystemObject, implemented getSystemObject
for system objects with payload
Refactor putSystemObjects
Moved systemCacheKey from data system_object
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-10-12 09:03:09 +03:00
Denis Kirillov
3231ecab03
[ #263 ] Add LWW to system objects
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-09-23 20:37:55 +03:00
Denis Kirillov
19b917e3b5
[ #253 ] Caches refactoring
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-09-14 10:46:18 +03:00
Denis Kirillov
458f9cf17b
[ #242 ] Fix versions sorting
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-09-07 17:06:22 +03:00
Angira Kekteeva
be08596c22
[ #231 ] cache: Add invalidation of ListObjectsCache
...
In put operations ListObjectsCache remove entries which can contain
put object
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-09-07 11:08:48 +03:00
Angira Kekteeva
1ece42b23f
[ #236 ] cache: Refactor ListObjectsCache
...
Replaced map in ListObjectsCache by gcache.
Now ListObjectsCache keeps only objectIDs and
requests ObjectInfo from cache or NeoFS.
Refactored ListObjectsCache keys: removed delimiter and method fields.
Now ListObjectsCache keeps cache with all objects versions.
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-09-07 11:08:48 +03:00
Angira Kekteeva
1bc2e51cbc
[ #236 ] api: Refactor caches: ObjectsList, Objects
...
Move ObjectsList from layer to cache package
Rename object_cache.go to objects.go
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-09-07 11:08:48 +03:00
Angira Kekteeva
239742f413
[ #236 ] api: Create info.go for basic structs
...
Moved BucketInfo and ObjectInfo from layer and handler to api
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-09-07 11:08:48 +03:00
Denis Kirillov
8b5ebe2ec2
[ #196 ] Add PutObjectTagging
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-31 10:46:42 +03:00
Angira Kekteeva
dcac1aa3e3
[ #230 ] layer: Change objects_list_cache's key
...
Remove access_key from objectsListCache key
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-26 12:54:58 +03:00
Denis Kirillov
4bb885d526
[ #122 ] Refactor
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 14:49:21 +03:00
Denis Kirillov
11558124cd
[ #122 ] Add versioning cache
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:15:00 +03:00
Denis Kirillov
f6c51cc9ee
[ #122 ] Update listObjectVerions
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:15:00 +03:00
Denis Kirillov
9c058a70fd
[ #122 ] Add tests
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:15:00 +03:00
Denis Kirillov
43185de52a
[ #122 ] Add list object versions
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:15:00 +03:00
Denis Kirillov
d5aef7566f
[ #122 ] Add delete versioned object
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:15:00 +03:00
Denis Kirillov
3130784ee6
[ #122 ] Add getting specific object version
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:13:12 +03:00
Denis Kirillov
f463522f34
[ #122 ] Add versioning put object
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:10:46 +03:00
Denis Kirillov
feb45d0633
[ #122 ] Add replacing objects
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-25 09:10:46 +03:00
Angira Kekteeva
295be71f00
[ #206 ] api: Add objects cache
...
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-18 10:16:27 +03:00
Angira Kekteeva
ae19eb4ad4
[ #206 ] Refactor ListObjectsCache
...
Replaced conflicting names
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-18 10:16:27 +03:00
Denis Kirillov
d332096598
[ #199 ] Refactor
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-08-11 13:17:37 +03:00
Angira Kekteeva
8a69c7cca0
[ #179 ] api: Add cache for ListObjectsV1/V2
...
Refactored cache for ListObjects:
made cache common for all versions,
simplified: remove dependendence on token/startafter
add mitable cachelifetime.
Refactored listobjects
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-08-09 13:52:11 +03:00
Angira Kekteeva
0ceea95e11
[ #112 ] Add cache to ListObjects and layer
...
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-07-28 17:05:11 +03:00
Angira Kekteeva
97a7d16f68
[ #112 ] api: Refactor allObjectsParams struct
...
Replaced Bucket (means name) by BucketInfo struct
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-07-26 23:22:05 +03:00
Alex Vanin
3f7941fdf3
Merge pull request #174 from nspcc-dev/feature/159-optional_owner
...
[#159 ] Add fetch-owner param
2021-07-26 13:32:04 +03:00
Denis Kirillov
63652d213c
[ #149 ] Removed grpc errors
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-07-22 09:54:12 +03:00
Denis Kirillov
65a61a9f7d
[ #159 ] Add fetch-owner param
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-07-20 15:40:38 +03:00
Denis Kirillov
c05e2d6757
[ #160 ] Fix head dir object
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-07-20 12:36:41 +03:00
Angira Kekteeva
ee84062154
[ #154 ] api: refactor ListObjectsV1 and V2
...
Separate ListObject for different versions.
Remove useless grouping of keys on V2.
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-07-19 10:12:47 +03:00
Denis Kirillov
a6ec27b40d
[ #93 ] Object ETag support
...
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-06-30 12:55:31 +03:00