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

[JENKINS-66014] Adding support retryable writes. #144

Merged
merged 6 commits into from
Feb 4, 2022

Conversation

rajeev-ranjan7
Copy link
Contributor

@rajeev-ranjan7 rajeev-ranjan7 commented Jun 30, 2021

Starting with MongoDB 4.2 compatible drivers, retryable writes is enabled by default. However, Amazon DocumentDB does not currently support retryable writes. I am adding a support to enable/disable that setting while using this plugin

Options

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Disable retryable writes settings while adding plugin configuration
@rajeev-ranjan7
Copy link
Contributor Author

@rsandell @TWestling

@@ -706,7 +721,7 @@ private MongoClient getMongoConnection() {

}).applyToServerSettings(builder12 -> {
}).applyToSocketSettings(builder13 -> builder13.connectTimeout((CONNECT_TIMEOUT), TimeUnit.MILLISECONDS)).
applyToSslSettings(builder14 -> builder14.enabled(tls));
applyToSslSettings(builder14 -> builder14.enabled(tls)).retryWrites(disableRetryWrites);
Copy link
Member

Choose a reason for hiding this comment

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

This looks so weird. Why is it inverted here and not below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed the concern and simplified it

@@ -41,11 +41,14 @@
<f:entry title="${%Use TLS connection}">
<f:checkbox field="tls" />
</f:entry>
<f:entry title="${%Disable RetryWrites}">
Copy link
Member

Choose a reason for hiding this comment

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

This makes it even more confusing.

Copy link
Member

Choose a reason for hiding this comment

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

Needs a help file and better naming of the field.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Simplified the change

@rajeev-ranjan7
Copy link
Contributor Author

@rsandell Updated the code

1 similar comment
@rajeev-ranjan7
Copy link
Contributor Author

@rsandell Updated the code

@rsandell rsandell changed the title JENKINS-66014 Adding support retryable writes to disable [JENKINS-66014] Adding support retryable writes. Feb 4, 2022
@rsandell rsandell merged commit 8ee9283 into jenkinsci:master Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants