Skip to content

Ensure read after write for segments - #1141

Merged
RichardScothern merged 2 commits into
distribution:masterfrom
lebauce:swift-no-missing-segment
Nov 10, 2015
Merged

RichardScothern merged 2 commits into
distribution:masterfrom
lebauce:swift-no-missing-segment

Conversation

@lebauce

@lebauce lebauce commented Oct 29, 2015

Copy link
Copy Markdown
Contributor

When a manifest has been uploaded, some segments of this manifest may not appear in the object listing yet. The manifest would then report a wrong size. To avoid this, we check that a segment appears after it has been created.

Signed-off-by: Sylvain Baubeau [email protected]

@RichardScothern

Copy link
Copy Markdown

@lebauce : do you have an intuition for the time of the database to become consistent? I wonder if an exponential backoff (with jitter) would work better here?

@lebauce
lebauce force-pushed the swift-no-missing-segment branch from 9f15c2e to 12b95be Compare October 30, 2015 16:05
@RichardScothern

Copy link
Copy Markdown

@lebauce : the tests are failing
Timeout expired while waiting for segments of /c.ddr2qsa-31dez/1-9f7-1d/taxl/z to show up

@lebauce

lebauce commented Oct 30, 2015

Copy link
Copy Markdown
Contributor Author

@RichardScothern They fail because the test server incorrectly (part of ncw/swift) implement ETags for manifest. I'll fix it.

@lebauce

lebauce commented Oct 30, 2015

Copy link
Copy Markdown
Contributor Author

@RichardScothern Regarding the time for the database to be consistent, I would say 2 to 3 seconds (that's what I observed on Rackspace Cloud Files)

@RichardScothern RichardScothern added this to the Registry/2.3 milestone Nov 2, 2015
Signed-off-by: Sylvain Baubeau <[email protected]>
@lebauce
lebauce force-pushed the swift-no-missing-segment branch from 12b95be to 3ff8af3 Compare November 3, 2015 16:10
@RichardScothern

Copy link
Copy Markdown

LGTM

@RichardScothern

Copy link
Copy Markdown

@nevermosby : could you review? I would like a second pair of eyes on it

@nevermosby

Copy link
Copy Markdown
Contributor

@RichardScothern LGTM. But I'd like to wait for the feedback of #1013.

@tdooner

tdooner commented Nov 10, 2015

Copy link
Copy Markdown

@nevermosby We've been running this patch for three days now, and results look good! I'll keep this thread updated if I see the problem resurface.

RichardScothern pushed a commit that referenced this pull request Nov 10, 2015
Ensure read after write for segments
@RichardScothern
RichardScothern merged commit a33095a into distribution:master Nov 10, 2015
@RichardScothern

Copy link
Copy Markdown

I'm going to merge this. @tdooner : I'll leave #1013 open for now, please update there if you see the problem again

@tdooner

tdooner commented Nov 10, 2015

Copy link
Copy Markdown

👍 Thanks a lot for looking into this! You guys rock.

@rabb1t

rabb1t commented Feb 29, 2016

Copy link
Copy Markdown

Hello guys!

How can I change those timeout settings(readAfterWriteTimeout, readAfterWriteWait)?

Currently I've faced with the problem when using read/write affinity in my openstack/swift multi-region cluster:

unable to delete layer upload resources: swift: HTTP Error: 503: 503 Internal Server Error

This happens because not all replicas are available for the GET requests straightaway and the proxy-server replyes with 503 error:

proxy-server: Object DELETE returning 503 for (204, 404, 404, 503) (txn: tx81cbb381d33e4312a57b3-0056d06af7)
proxy-server: Object DELETE returning 503 for (204, 404, 404, 503) (txn: tx8c288cf0221240b5a9a15-0056d06b70)
proxy-server: Object DELETE returning 503 for (204, 404, 404, 503) (txn: tx89edc058dde248a0ae64d-0056d06b72)

Usually it takes about 1 or 2 seconds to move all object's replicas to their proper locations inside the cluster.

thaJeztah pushed a commit to thaJeztah/distribution that referenced this pull request Apr 22, 2021
…gment

Ensure read after write for segments
thaJeztah pushed a commit to thaJeztah/distribution that referenced this pull request Jan 19, 2022
…gment

Ensure read after write for segments
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.

6 participants