Skip to content

Drop support for old tombstones#3731

Merged
roman-khimov merged 6 commits intomasterfrom
drop-support-for-old-ts
Dec 11, 2025
Merged

Drop support for old tombstones#3731
roman-khimov merged 6 commits intomasterfrom
drop-support-for-old-ts

Conversation

@roman-khimov
Copy link
Member

@roman-khimov roman-khimov commented Dec 10, 2025

A part of #3476.

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 removes support for tombstone objects with API version < 2.18, which previously stored deleted object references in the payload. The new implementation only supports the modern tombstone format (API v2.18+) that stores a single deleted object reference in the header via the AssociatedObject field.

Key Changes:

  • Removed VerifyTomb method that validated old-format tombstones with multiple members
  • Consolidated validation logic for Lock and Tombstone objects using parameterized error messages
  • Removed test cases for deprecated tombstone formats

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/services/object/tombstone/verify.go Removed VerifyTomb method and associated concurrency handling; kept only VerifyTombStoneWithoutPayload for API v2.18+
pkg/services/object/tombstone/verify_test.go Removed tests for old tombstone formats; updated remaining tests to use new API exclusively; removed unused helper functions
pkg/core/object/fmt.go Removed VerifyTomb from TombVerifier interface; consolidated Lock/Tombstone validation with stricter checks; simplified ValidateContent to reject pre-2.18 system objects
pkg/core/object/fmt_test.go Removed test case for old tombstone content validation with payload
pkg/core/object/ec_test.go Updated tombstone EC test to properly configure v2.18 tombstone with header-based target
pkg/services/object/put/service_test.go Added explicit SetType(object.TypeRegular) calls to test objects to satisfy stricter validation
CHANGELOG.md Added entry documenting that tombstone objects with API < 2.18 are no longer accepted

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 61.81818% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.84%. Comparing base (7fca8a8) to head (d068a59).
⚠️ Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
pkg/core/object/fmt.go 30.76% 16 Missing and 2 partials ⚠️
pkg/services/object/put/distributed.go 85.71% 1 Missing and 1 partial ⚠️
pkg/services/object/put/ec.go 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3731      +/-   ##
==========================================
- Coverage   26.89%   26.84%   -0.05%     
==========================================
  Files         658      658              
  Lines       41861    41814      -47     
==========================================
- Hits        11258    11226      -32     
+ Misses      29566    29552      -14     
+ Partials     1037     1036       -1     

☔ 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.

@roman-khimov roman-khimov force-pushed the drop-support-for-old-ts branch 2 times, most recently from 2f2214c to b95ea25 Compare December 10, 2025 14:35
@roman-khimov
Copy link
Member Author

Follow what a88a651 has done for LOCKs. All
current networks should generate post-2.18 objects now and old tombstones have
already expired. A part of #3476.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
@roman-khimov roman-khimov force-pushed the drop-support-for-old-ts branch from b95ea25 to 949d434 Compare December 10, 2025 20:59
@roman-khimov
Copy link
Member Author

That's where it should be, Validate() checks headers and expiration should
be set immediately. This avoids double-checking and also allows to catch
problems faster. Object PUT test actually reveals that, by default test
object is a tombstone and it was missing expiration attribute.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
Now they're essentially the same, except for one thing. Drop duplicating
checks from VerifyTombStoneWithoutPayload as well.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
"Unprepared" objects are often missing versions, but the don't have payloads
normally anyway and associated attribute must be set already, otherwise it'll
be invalid later. In some ways attribute check makes version check somewhat
excessive, but it's left for now.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
It's always empty since 45150c9, this data
is unused and many more functions can be simplified now because of that.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
Originally verifier only cared about relations, but it also has the header
of the target object, so a type check costs nothing here while it's very much
useful. TS can't target another TS and LOCK by protocol and LINKs can't be
deleted as well since user needs to delete the parent object. I believe this
even fixes #3498 although at a bit different (pre-engine) level, but engine
can be somewhat more dumb.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
@roman-khimov roman-khimov merged commit fe0b6ef into master Dec 11, 2025
22 checks passed
@roman-khimov roman-khimov deleted the drop-support-for-old-ts branch December 11, 2025 14:46
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