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

User persister factory in storage unit #32

Merged
merged 4 commits into from
Dec 7, 2023

Conversation

ssd04
Copy link
Contributor

@ssd04 ssd04 commented Dec 5, 2023

No description provided.

@ssd04 ssd04 self-assigned this Dec 5, 2023
@ssd04 ssd04 marked this pull request as ready for review December 5, 2023 10:47
@iulianpascalau iulianpascalau self-requested a review December 5, 2023 10:50
@@ -378,21 +374,14 @@ type ArgDB struct {
}

// NewDB creates a new database from database config
func NewDB(argDB ArgDB) (types.Persister, error) {
// TODO: refactor to integrate retries loop into persister factory; maybe implement persister
// factory separatelly in storage repo
Copy link
Contributor

Choose a reason for hiding this comment

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

remove extra indent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

func NewDB(argDB ArgDB) (types.Persister, error) {
// TODO: refactor to integrate retries loop into persister factory; maybe implement persister
// factory separatelly in storage repo
func NewDB(persisterFactory PersisterFactoryHandler, path string) (types.Persister, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

for extra protection (even if this is temporary) I would add a nil check for the provided persisterFactory. Maybe make the interface implement NilInterfaceChecker interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added nil check

@ssd04 ssd04 merged commit 1105772 into rc/v1.6.0 Dec 7, 2023
2 checks passed
@iulianpascalau iulianpascalau deleted the storage-unit-persister-factory branch December 7, 2023 13:37
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