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

Persister tmp file path #5995

Merged
merged 10 commits into from
Feb 29, 2024
Merged

Conversation

ssd04
Copy link
Contributor

@ssd04 ssd04 commented Feb 26, 2024

Reasoning behind the pull request

  • Use UseTmpAsFilePath db config field for all persisters

Testing procedure

  • Standard testing procedure

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@ssd04 ssd04 self-assigned this Feb 26, 2024
Copy link

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 89.47368% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 80.37%. Comparing base (3e19e99) to head (2e88a8f).
Report is 1 commits behind head on feat/refactor-persister-factory.

Files Patch % Lines
storage/factory/persisterFactory.go 75.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@                         Coverage Diff                         @@
##           feat/refactor-persister-factory    #5995      +/-   ##
===================================================================
- Coverage                            80.37%   80.37%   -0.01%     
===================================================================
  Files                                  709      709              
  Lines                                94013    94000      -13     
===================================================================
- Hits                                 75566    75553      -13     
  Misses                               13161    13161              
  Partials                              5286     5286              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ssd04 ssd04 marked this pull request as ready for review February 28, 2024 13:03
@@ -49,25 +51,33 @@ func (pc *persisterCreator) Create(path string) (storage.Persister, error) {
return database.NewShardedPersister(path, pc, shardIDProvider)
}

func getTmpFilePath(path string, pathSeparator string) (string, error) {
pathItems := strings.Split(path, pathSeparator)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of using the pathSeparator const, can we make use of the path package? Maybe path.Split can help?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, used path package, thanks

@ssd04 ssd04 merged commit 7d8cd10 into feat/refactor-persister-factory Feb 29, 2024
7 checks passed
@ssd04 ssd04 deleted the persister-tmp-file-path branch February 29, 2024 09:07
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.

3 participants