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

DELETE object does not delete writing state manifests [JIRA: RCS-316] #770

Closed
shino opened this issue Jan 8, 2014 · 5 comments
Closed

Comments

@shino
Copy link
Contributor

shino commented Jan 8, 2014

At tag 1.2.2 (expected result, {leeway_seconds, 2} in app.config):

# Try PUT 1GB object and disconnect in uploading (by Ctr-C)
$ s3cmd --disable-multipart -c .s3cfg.8071.alice put /data/static/rand.1GB s3://test
/data/static/rand.1GB -> s3://test/rand.1GB  [1 of 1]
   26419200 of 1073741824     2% in    2s    11.39 MB/s^CSee ya!

# Then inspect the bucket, there is one 'writing' manifest
$ scripts.local/riak_cs_inspector.sh 127.0.0.1 dev1 test
Key ============================: Sibl. == State ========== UUID =========================== Content-Length== First Block ====
rand.1GB                        : 1        writing          8334e5fc480c4ea1836226701a643451       1073741824 Found

# Wait 2 sec (= leeway_seconds) and delete it
(py27_base)shino@shino-xub-vbox$ s3cmd -v -c .s3cfg.8071.alice del s3://test/rand.1GB
INFO: Applying --exclude/--include
INFO: Summary: 1 remote files to delete
File s3://test/rand.1GB deleted

# The manifest turns into 'scheduled_delete', nice
$ scripts.local/riak_cs_inspector.sh 127.0.0.1 dev1 test
Key ============================: Sibl. == State ========== UUID =========================== Content-Length== First Block ====
rand.1GB                        : 1        scheduled_delete 8334e5fc480c4ea1836226701a643451       1073741824 **Not Found**

# After GC, the manifest disappears
$ scripts.local/riak_cs_inspector.sh 127.0.0.1 dev1 test
Key ============================: Sibl. == State ========== UUID =========================== Content-Length== First Block ====

At 1.4.3 (unexpected, also {leeway_seconds, 2} in app.config)

# Try PUT 1GB object and disconnect in uploading (by Ctr-C)
$ s3cmd --disable-multipart -c .s3cfg.8071.alice put /data/static/rand.1GB s3://test
/data/static/rand.1GB -> s3://test/rand.1GB  [1 of 1]
   19075072 of 1073741824     1% in    1s    17.64 MB/s^CSee ya!

# Then inspect the bucket, there is one 'writing' manifest
$ scripts.local/riak_cs_inspector.sh 127.0.0.1 dev1 test
Key ============================: Sibl. == State ========== UUID =========================== Content-Length== First Block ====
rand.1GB                        : 1        writing          4e1c3f19082048e496c44c7a05eeccc9       1073741824 Found

# Wait 2 sec (= leeway_seconds) and delete it
$ s3cmd -v -c .s3cfg.8071.alice del s3://test/rand.1GB
INFO: Applying --exclude/--include
INFO: Summary: 1 remote files to delete
File s3://test/rand.1GB deleted

# The manifest still remains in 'writing' state.
$ scripts.local/riak_cs_inspector.sh 127.0.0.1 dev1 test
Key ============================: Sibl. == State ========== UUID =========================== Content-Length== First Block ====
rand.1GB                        : 1        writing          4e1c3f19082048e496c44c7a05eeccc9       1073741824 Found

1.4.0 and 1.3.2 show the same result as 1.4.3.

@shino shino added this to the 1.5.1 milestone Jun 10, 2014
@kuenishi kuenishi modified the milestones: 1.5.1, 2.0.0 Sep 4, 2014
@kuenishi kuenishi modified the milestones: 2.0.0, 2.1.0 Jan 15, 2015
@kuenishi kuenishi modified the milestones: 2.0.1, 2.1.0 Apr 3, 2015
@kuenishi kuenishi modified the milestones: 2.1.1, 2.2.0 Dec 4, 2015
@kuenishi
Copy link
Contributor

kuenishi commented Jan 6, 2016

Partial solution is #1280 that collects manifest and blocks when a socket was closed by client or any other errors. Do we add another work on "existing" stale write objects?

@Basho-JIRA Basho-JIRA changed the title DELETE object does not delete writing state manifests DELETE object does not delete writing state manifests [JIRA: RCS-316] Jan 6, 2016
@shino
Copy link
Contributor Author

shino commented Jan 6, 2016

For existing manifests (writing and pending_delete) should be treated in another way, I think. #937 is the issue for that. So, I agree that #1280 is good solution for this issue.

@kuenishi
Copy link
Contributor

For release note:

The issue was, if there was a canceled upload, manifest was left as writing and no overwrite happened then those partially uploaded blocks and manifest were to be left as it was and occupies certain disk space. This is fixed by adding additional error handling routine to move the manifest to GC bucket by catching socket error.

@kuenishi
Copy link
Contributor

Although, there might still be chance to leave such manifest in case of CS node failure, which are to be collected by #937 fixes.

@kuenishi
Copy link
Contributor

So far I close this issue and let us track #937.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants