[#xx] Add general sanity tests for object stores #671

Closed
ale64bit wants to merge 1 commit from ale64bit/frostfs-node:feature/store-basic-sanity-test into master
Member

Signed-off-by: Alejandro Lopez a.lopez@yadro.com

Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
ale64bit force-pushed feature/store-basic-sanity-test from 6cceca4239 to 98744aa5e1 2023-08-31 14:23:08 +00:00 Compare
ale64bit requested review from storage-core-committers 2023-08-31 14:24:06 +00:00
ale64bit requested review from storage-core-developers 2023-08-31 14:24:15 +00:00
dstepanov-yadro approved these changes 2023-08-31 15:31:43 +00:00
fyrchik reviewed 2023-08-31 15:38:12 +00:00
@ -0,0 +15,4 @@
// ObjectStore is the general interface of implementations of object storage.
//
// It can be used to wrap other storages and execute generic sanity tests on them.
type ObjectStore interface {
Owner

Where is it intended to be used? Wouldn't it be better to put in blobstor/internal/blobstortest?

Where is it intended to be used? Wouldn't it be better to put in `blobstor/internal/blobstortest`?
Author
Member

Not sure there's an actual difference for us between a "blob" and an "object" from the storage viewpoint. Why to move it there?

Anyway, it's intended to be used everywhere it can be plugged in. For example:

  • whole engine can be wrapped to implement ObjectStore.
  • whole shard can be wrapped to implement ObjectStore.
  • any of the common.Storage implementations can be wrapped and used almost verbatim.
  • any writecache implementation can be wrapped in a shard, using the memstore as blobstor and metabase, to test that the interaction between writecache and backing storage is correct.
Not sure there's an actual difference for us between a "blob" and an "object" from the storage viewpoint. Why to move it there? Anyway, it's intended to be used everywhere it can be plugged in. For example: - whole engine can be wrapped to implement `ObjectStore`. - whole shard can be wrapped to implement `ObjectStore`. - any of the `common.Storage` implementations can be wrapped and used almost verbatim. - any writecache implementation can be wrapped in a shard, using the `memstore` as blobstor and metabase, to test that the interaction between writecache and backing storage is correct.
Owner

I would like these generic tests suites to have specific purpose, not scattered around the codebase.
Does it make sense to use these tests for common.Storage or they are already covered in another suite?
Why not just use common.Storage as an interface and store somewhere close to blobstortest?

I would like these generic tests suites to have specific purpose, not scattered around the codebase. Does it make sense to use these tests for common.Storage or they are already covered in another suite? Why not just use `common.Storage` as an interface and store somewhere close to blobstortest?
Author
Member

I would like these generic tests suites to have specific purpose, not scattered around the codebase.

Cool. Note that "generic" means that the purpose might not be "specific".

Does it make sense to use these tests for common.Storage or they are already covered in another suite?

These tests make sense for anything that implements ObjectStore or is conceptually close to it.

Why not just use common.Storage as an interface and store somewhere close to blobstortest?

Because it's bloated as hell.

> I would like these generic tests suites to have specific purpose, not scattered around the codebase. Cool. Note that "generic" means that the purpose might not be "specific". > Does it make sense to use these tests for common.Storage or they are already covered in another suite? These tests make sense for anything that implements `ObjectStore` or is conceptually close to it. > Why not just use common.Storage as an interface and store somewhere close to blobstortest? Because it's bloated as hell.
Owner

Cool. Note that "generic" means that the purpose might not be "specific".

Generic over the implementation, specific in functional purpose.

Because it's bloated as hell.

Adding yet another suite of tests (similar in spirit but with different interface) doesn't improve the situation, and likely, makes it even worse.

> Cool. Note that "generic" means that the purpose might not be "specific". Generic over the implementation, specific in functional purpose. > Because it's bloated as hell. Adding yet another suite of tests (similar in spirit but with different interface) doesn't improve the situation, and likely, makes it even worse.
fyrchik approved these changes 2023-08-31 15:38:15 +00:00
acid-ant approved these changes 2023-09-01 06:37:08 +00:00
ale64bit closed this pull request 2023-09-01 08:44:49 +00:00
All checks were successful
DCO action / DCO (pull_request) Successful in 4m1s
Required
Details
Vulncheck / Vulncheck (pull_request) Successful in 4m14s
Required
Details
Build / Build Components (1.20) (pull_request) Successful in 5m35s
Required
Details
Build / Build Components (1.21) (pull_request) Successful in 5m35s
Required
Details
Tests and linters / Staticcheck (pull_request) Successful in 6m1s
Required
Details
Tests and linters / Lint (pull_request) Successful in 7m23s
Required
Details
Tests and linters / Tests (1.20) (pull_request) Successful in 7m52s
Required
Details
Tests and linters / Tests (1.21) (pull_request) Successful in 8m15s
Required
Details
Tests and linters / Tests with -race (pull_request) Successful in 12m6s
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#671
No description provided.