-
Notifications
You must be signed in to change notification settings - Fork 202
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 create with retries in persister factory #5797
use create with retries in persister factory #5797
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## feat/refactor-persister-factory #5797 +/- ##
===================================================================
+ Coverage 80.34% 80.37% +0.03%
===================================================================
Files 709 709
Lines 94112 94013 -99
===================================================================
- Hits 75615 75566 -49
+ Misses 13203 13161 -42
+ Partials 5294 5286 -8 ☔ View full report in Codecov by Sentry. |
go.mod
Outdated
@@ -19,7 +19,7 @@ require ( | |||
github.com/multiversx/mx-chain-es-indexer-go v1.4.18-0.20231228064619-e3b0caf29058 | |||
github.com/multiversx/mx-chain-logger-go v1.0.14-0.20231215125130-a3bed6e76040 | |||
github.com/multiversx/mx-chain-scenario-go v1.2.2-0.20231129113427-ad3056f45296 | |||
github.com/multiversx/mx-chain-storage-go v1.0.15-0.20231213110622-e222ba96a9f4 | |||
github.com/multiversx/mx-chain-storage-go v1.0.15-0.20240131142608-5c126467749c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should update to latest commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to latest version
} | ||
|
||
// NewStorageUnitFromConf creates a new storage unit from a storage unit config | ||
func NewStorageUnitFromConf(cacheConf CacheConfig, dbConf DBConfig, persisterFactory storage.PersisterFactoryHandler) (*Unit, error) { | ||
return storageUnit.NewStorageUnitFromConf(cacheConf, dbConf, persisterFactory) | ||
if dbConf.MaxBatchSize > int(cacheConf.Capacity) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not move the CreateWithRetries logic on storage-go, which gets as parameter the number of retries?
this way we remove this code which seems to be duplicated in storageUnit.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wanted to keep NewStorageUnitFromConf as before; also since CreatWithRetries is specific to our persister implementation in mx-chain-go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but indeed, it is to be discussed
Reasoning behind the pull request
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?