Skip to content

Feat/lock and ts with no payload#3470

Merged
roman-khimov merged 4 commits intomasterfrom
feat/lock-and-ts-with-no-payload
Jul 22, 2025
Merged

Feat/lock and ts with no payload#3470
roman-khimov merged 4 commits intomasterfrom
feat/lock-and-ts-with-no-payload

Conversation

@carpawell
Copy link
Member

No description provided.

@carpawell carpawell force-pushed the feat/lock-and-ts-with-no-payload branch from f538c05 to 3e8c7b4 Compare July 15, 2025 16:23
@codecov
Copy link

codecov bot commented Jul 15, 2025

Codecov Report

Attention: Patch coverage is 41.90871% with 140 lines in your changes missing coverage. Please review.

Project coverage is 23.07%. Comparing base (31d76ff) to head (8f6a66a).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
pkg/core/object/fmt.go 12.00% 21 Missing and 1 partial ⚠️
pkg/local_object_storage/engine/put.go 21.42% 20 Missing and 2 partials ⚠️
pkg/local_object_storage/metabase/put.go 51.16% 19 Missing and 2 partials ⚠️
pkg/services/object/put/local.go 0.00% 16 Missing and 1 partial ⚠️
pkg/services/object/delete/local.go 0.00% 15 Missing ⚠️
cmd/neofs-cli/modules/object/lock.go 0.00% 14 Missing ⚠️
pkg/core/version/version.go 0.00% 9 Missing ⚠️
pkg/local_object_storage/metabase/status.go 0.00% 8 Missing ⚠️
pkg/local_object_storage/metabase/counter.go 0.00% 6 Missing ⚠️
pkg/local_object_storage/metabase/exists.go 66.66% 2 Missing and 1 partial ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3470      +/-   ##
==========================================
+ Coverage   22.97%   23.07%   +0.09%     
==========================================
  Files         669      669              
  Lines       50089    50216     +127     
==========================================
+ Hits        11508    11586      +78     
- Misses      37680    37722      +42     
- Partials      901      908       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@carpawell carpawell force-pushed the feat/lock-and-ts-with-no-payload branch 2 times, most recently from ddeafc7 to 6e84c8f Compare July 16, 2025 08:47
@carpawell carpawell marked this pull request as ready for review July 16, 2025 09:20
@carpawell carpawell requested a review from roman-khimov July 16, 2025 18:56
@carpawell carpawell force-pushed the feat/lock-and-ts-with-no-payload branch from 6e84c8f to c10d35b Compare July 16, 2025 18:56
@carpawell carpawell force-pushed the feat/lock-and-ts-with-no-payload branch from c10d35b to 513aba6 Compare July 17, 2025 16:52
@carpawell carpawell requested a review from roman-khimov July 17, 2025 16:52
@roman-khimov
Copy link
Member

Tests fail here.

@roman-khimov roman-khimov requested a review from Copilot July 18, 2025 12:05

This comment was marked as outdated.

@carpawell carpawell force-pushed the feat/lock-and-ts-with-no-payload branch from 513aba6 to cb55611 Compare July 18, 2025 16:25
@roman-khimov roman-khimov requested a review from Copilot July 21, 2025 13:02

This comment was marked as outdated.

It adds support for delete/lock operations made via the new `__NEOFS__ASSOCIATE`
object attribute.
Locked objects are fully supported, and LOCK status is checked as the "new"
metabase index inclusion; at the same time, the old list-based approach is still
used and kept for the next compatible release.
Expired objects/GC marks/GC process/etc are kept for now, and it will be easier
to delete the whole list-based object control flow after the next release,
adding migration, removing all the non-PUT system object handling, and unit
tests at once.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Since API 2.18 locked object should be in LOCK object's attributes. Continue
supporting locking many objects with a single neofs-cli command call but PUTting
many LOCK objects.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Such objects have been deprecated in v2.18.0 API.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@carpawell carpawell force-pushed the feat/lock-and-ts-with-no-payload branch from cb55611 to 8f6a66a Compare July 21, 2025 19:18
@roman-khimov roman-khimov requested a review from Copilot July 22, 2025 06:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements support for lock and tombstone objects with no payload as part of API v2.18+ changes. The key modification is transitioning from storing object targets in payloads to storing them in object headers through associations.

  • Adds version checking to determine if system objects should store targets in headers vs payload
  • Updates metabase operations to handle new lock/tombstone association patterns
  • Modifies CLI tooling to create individual lock objects per target instead of batch operations

Reviewed Changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pkg/core/version/version.go Adds version checking for system object target storage location
pkg/services/object/put/local.go Adds version check to conditionally process object metadata
pkg/services/object/delete/local.go Simplifies tombstone creation for new API version
pkg/services/object/delete/exec.go Removes old tombstone creation logic
pkg/local_object_storage/metabase/*.go Updates database operations to support header-based associations
pkg/local_object_storage/engine/put.go Adds system object handling for new API version
pkg/core/object/fmt.go Updates validation for payload-less system objects
cmd/neofs-cli/modules/object/lock.go Changes to create individual lock objects per target

@roman-khimov roman-khimov merged commit c363b9e into master Jul 22, 2025
22 of 23 checks passed
@roman-khimov roman-khimov deleted the feat/lock-and-ts-with-no-payload branch July 22, 2025 06:12
carpawell added a commit that referenced this pull request Jul 22, 2025
Target's place has changed but the rules are the same. Refs #3470.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit that referenced this pull request Jul 22, 2025
Once LOCK object is expired, LOCKed object must be free to delete. Refs #3470.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit that referenced this pull request Jul 23, 2025
Once LOCK object is expired, LOCKed object must be free to delete. Refs #3470.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit that referenced this pull request Jul 23, 2025
Once LOCK object is expired, LOCKed object must be free to delete. Refs #3470.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit that referenced this pull request Jul 24, 2025
Since this feature is not present yet, no backward compatibility, only new
objects. Refs #3470.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit that referenced this pull request Jul 24, 2025
Since this feature has not yet been presented, no backward compatibility, only
new objects. Refs #3470.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
carpawell added a commit that referenced this pull request Jul 24, 2025
Since this feature has not yet been presented, no backward compatibility, only
new objects. Refs #3470.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants