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

fix: Avoid duplicate temp file name for install-snapshot requests #15565

Merged
merged 1 commit into from
May 18, 2024

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented May 17, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

fix: Avoid duplicate temp file name for install-snapshot requests

This commit resolves an issue where duplicate temporary file names were
generated when two install-snapshot requests were received in close
temporal proximity. This could potentially lead to conflicts and
erroneous behavior during snapshot installation.

Changes:

  • Added logic to generate unique temporary file names for each
    install-snapshot request to prevent naming conflicts.

  • Additionally, this commit enhances error handling by including context
    information in the io::Error returned from SnapshotStoreV002. This
    improvement aids in better understanding the source and nature of
    errors when they occur.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)

Related Issues


This change is Reviewable

Sorry, something went wrong.

@github-actions github-actions bot added the pr-bugfix this PR patches a bug in codebase label May 17, 2024

Verified

This commit was signed with the committer’s verified signature.
rm3l Armel Soro
This commit resolves an issue where duplicate temporary file names were
generated when two install-snapshot requests were received in close
temporal proximity. This could potentially lead to conflicts and
erroneous behavior during snapshot installation.

Changes:

- Added logic to generate unique temporary file names for each
  install-snapshot request to prevent naming conflicts.

- Additionally, this commit enhances error handling by including context
  information in the `io::Error` returned from `SnapshotStoreV002`. This
  improvement aids in better understanding the source and nature of
  errors when they occur.
@drmingdrmer drmingdrmer marked this pull request as ready for review May 17, 2024 15:03
@drmingdrmer drmingdrmer requested a review from lichuang May 17, 2024 15:11
@drmingdrmer drmingdrmer merged commit 1dad976 into databendlabs:main May 18, 2024
75 checks passed
@drmingdrmer drmingdrmer deleted the 79-fix-snapshot branch May 18, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix this PR patches a bug in codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant