Remove Remove method from Adapter interface and its implementations a… #9651
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…cross various storage adapters
Closes #9614
Change Description
Remove unused
Adapter.Removemethod from the block adapter interface and all its implementations.Background
The
Removemethod in the block adapter interface was not being used anywhere in the codebase except in tests. As mentioned in issue #9614, this makes issue #6836 (which was about optimizing the S3 Remove implementation with wait/verify logic) meaningless since the method is never actually called in production code.This PR removes:
Removemethod from theAdapterinterfacetestAdapterRemoveThis simplifies the codebase and removes approximately ~230 lines of dead code, including the expensive
waiter.Waitoperation in the S3 adapter that was waiting for object deletion confirmation.Bug Fix
N/A - This is a tech debt cleanup, not a bug fix.
New Feature
N/A - This PR removes code rather than adding new features.
Testing Details
Removemethod is not called anywhere in production code using grep searchesRemovewere in test code, which has been appropriately removedBreaking Change?
Technically yes - this removes a public method from the
Adapterinterface. However, the method was not used anywhere in the actual codebase (only in tests), so there should be no practical impact on existing functionality.Impact:
Additional info
Files modified:
pkg/block/adapter.go- removed method from interfacepkg/block/s3/adapter.go- removed S3 implementationpkg/block/gs/adapter.go- removed GCS implementationpkg/block/azure/adapter.go- removed Azure implementationpkg/block/local/adapter.go- removed local filesystem implementationpkg/block/mem/adapter.go- removed in-memory implementationpkg/block/transient/adapter.go- removed transient implementationpkg/block/metrics.go- removed metrics wrapperpkg/block/blocktest/basic_suite.go- removed test and unused importContact Details
[email protected]