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

Use new conditional writes API on S3 for user-configurable overrides #4103

Open
yvrhdn opened this issue Sep 20, 2024 · 0 comments
Open

Use new conditional writes API on S3 for user-configurable overrides #4103

yvrhdn opened this issue Sep 20, 2024 · 0 comments

Comments

@yvrhdn
Copy link
Member

yvrhdn commented Sep 20, 2024

Is your feature request related to a problem? Please describe.

The user-configurable overrides API allows clients to write and update a subset of Tempo overrides. The overrides are stored in a bucket (separate from the traces). See also Tempo - user-configurable overrides.

User-configurable overrides are versioned and when a client wishes to update them they should supply the current version to avoid concurrent writes. GCS and Azure blob storage support this capability but AWS S3 did not so far, leading to a best-effort implementation:

func (rw *readerWriter) WriteVersioned(ctx context.Context, name string, keypath backend.KeyPath, data io.Reader, version backend.Version) (backend.Version, error) {
// Note there is a potential data race here because S3 does not support conditional headers. If
// another process writes to the same object in between ReadVersioned and Write its changes will
// be overwritten.

Describe the solution you'd like

S3 has announced they now support conditional writes. Docs on adding preconditions.

We should extend our S3 backend implementation and make use of the new preconditions.

⚠ Not all S3-compatible backends might support preconditions. We should take some time to investigate what they are planning to do and ensure those will still work.

Describe alternatives you've considered

We can keep using our best-effort implementation, since volume is low this is unlikely to cause a lot of issues.

Additional context

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

No branches or pull requests

1 participant