Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PUT operation on unversioned objects not always atomic #462

Closed
l-mb opened this issue Apr 20, 2023 · 3 comments · Fixed by aquarist-labs/ceph#168
Closed

PUT operation on unversioned objects not always atomic #462

l-mb opened this issue Apr 20, 2023 · 3 comments · Fixed by aquarist-labs/ceph#168
Assignees
Labels
area/rgw-sfs RGW & SFS related kind/bug Something isn't working priority/0 Needs to go into the next release or force a patch
Milestone

Comments

@l-mb
Copy link

l-mb commented Apr 20, 2023

When an object already exists and a PUT operation to the same object name happens, a concurrent GET operation may see a truncated or missing object.

The expected correct behaviour is that the GET sees either the old state or the new state only.

@l-mb l-mb added kind/bug Something isn't working priority/0 Needs to go into the next release or force a patch area/rgw-sfs RGW & SFS related labels Apr 20, 2023
@l-mb l-mb added this to the v0.16.0 milestone Apr 20, 2023
@giubacc giubacc assigned giubacc and unassigned giubacc May 11, 2023
@giubacc
Copy link

giubacc commented May 11, 2023

A thing we must decide before starting to address this is what model we want to implement.
When there is an on-going PUT a GET sees:

  • old state ?
  • new state ?

The following reasoning assumes that a GET is issued without specifying the object version in the query string.
When a GET has the version object specified, IMO the problem should not exist (but I could be wrong).

To me, make the GET to see the old state makes more sense.
The old state here means:

  1. Non-versioned or version suspended buckets: the latest committed version (the null version for suspended-versioned buckets)

  2. Versioned buckets: a GET must point a version so I don't think the problem exists here; It could exist when the null version exists because the bucket has firstly been version suspended and then version re-enabled.

@giubacc giubacc added the required/discussion A discussion within the team is needed label May 12, 2023
@irq0
Copy link
Contributor

irq0 commented May 12, 2023

We addressed this in the design review https://github.com/aquarist-labs/s3gw/pull/497

@irq0
Copy link
Contributor

irq0 commented May 16, 2023

S3 Tests

dirty read tests - halt a second write before finish, check if first write is still there
test_atomic_write_8mb
test_atomic_write_4mb
test_atomic_write_1mb

with two writes, see either one or the other
test_atomic_dual_write_8mb
test_atomic_dual_conditional_write_1mb

test_atomic_conditional_write_1mb

test_versioned_concurrent_object_create_and_remove fail
test_versioned_concurrent_object_create_concurrent_remove fail

@jhmarina jhmarina modified the milestones: v0.17.0, v0.18.0 Jun 12, 2023
@jhmarina jhmarina removed the required/discussion A discussion within the team is needed label Jul 4, 2023
@jhmarina jhmarina modified the milestones: v0.18.0, v.0.19.0 Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rgw-sfs RGW & SFS related kind/bug Something isn't working priority/0 Needs to go into the next release or force a patch
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants