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

INTMDB-252: Added two parameters for Process args #250

Merged
merged 1 commit into from Sep 8, 2021

Conversation

coderGo93
Copy link
Contributor

Description

  • Added two parameters defaultReadConcern and defaultWriteConcern for process args

Link to any related issue(s):

Type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Required Checklist:

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code

Further comments

@coderGo93 coderGo93 requested a review from a team as a code owner September 4, 2021 00:10
@coderGo93 coderGo93 requested review from andreaangiolillo and removed request for a team September 4, 2021 00:10
Comment on lines +173 to +174
DefaultReadConcern string `json:"defaultReadConcern,omitempty"`
DefaultWriteConcern string `json:"defaultWriteConcern,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

[q] have you tested with a number as string ("1")? reasons I ask is that technically this is "majority" (string) or 1...n as number, API seems to accept string but want to make sure it's handled correctly, I'll merge after confirming this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have not tested defaultWriteConcern as number, since the docs says is a string, will test defaultWriteConcern as number to see what happens

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gssbzn , I changed to int64 and it seems you can pass as integer/number in request, but the issue is in the response, it will panic like this
json: cannot unmarshal string into Go struct field ProcessArgs.defaultWriteConcern of type int64

so in response it seems the defaultWriteConcern will always return as string

Copy link
Collaborator

@gssbzn gssbzn left a comment

Choose a reason for hiding this comment

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

LGTM with a question, will merge after confirming

Copy link
Collaborator

@andreaangiolillo andreaangiolillo left a comment

Choose a reason for hiding this comment

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

LGTM

@gssbzn gssbzn merged commit a8f9b16 into mongodb:master Sep 8, 2021
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.

None yet

3 participants