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

Map opts.replicas to sc.num_replicas in Object Store init #717

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

SalvaChiLlo
Copy link

The library interface, defined by the ObjectStoreOptions type, currently expects a parameter named replicas to specify the number of replicas for the object store. However, internally, the correct parameter to be used is num_replicas. To align with the existing initialization method of KV, the initialization method of OB should also map opts.replicas to sc.num_replicas. This ensures consistency and proper utilization of the replicas parameter within the object store configuration.

@SalvaChiLlo SalvaChiLlo marked this pull request as draft July 15, 2024 08:45
@SalvaChiLlo SalvaChiLlo marked this pull request as ready for review July 15, 2024 08:45
Copy link
Member

@aricart aricart left a comment

Choose a reason for hiding this comment

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

LGTM - will add a test and simplify as KV to just assign opts.replicas and let the server deal with the absence of the value.

@aricart aricart merged commit 115c68e into nats-io:main Jul 24, 2024
@aricart
Copy link
Member

aricart commented Jul 24, 2024

@SalvaChiLlo thank you for spotting this.

aricart added a commit that referenced this pull request Jul 24, 2024
aricart added a commit that referenced this pull request Jul 24, 2024
[TEST] added test to cover fix for #717
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.

2 participants