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

refactor: optimize create job task of control plane #415

Merged
merged 1 commit into from
May 17, 2023

Conversation

jaemin-shin
Copy link
Collaborator

optimized create job task of control plane by changing the DB write task to insert multiple entries in batch, instead of original method of inserting one by one. changing it to insert multiple entries at once at DB makes the overall create job procedure faster. in addition, nginx timeout and message size parameters are updated for scalable create job task.

Description

Please provide a meaningful description of what this change will do, or is for. Bonus points for including links to
related issues, other PRs, or technical references.

Note that by not including a description, you are asking reviewers to do extra work to understand the context of this
change, which may lead to your PR taking much longer to review, or result in it not being reviewed at all.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

optimized create job task of control plane by changing the DB write task to insert multiple entries in batch, instead of original method of inserting one by one.
changing it to insert multiple entries at once at DB makes the overall create job procedure faster.
in addition, nginx timeout and message size parameters are updated for scalable create job task.
@jaemin-shin jaemin-shin requested a review from myungjin May 15, 2023 23:01
@codecov-commenter
Copy link

Codecov Report

Merging #415 (9ca5b01) into main (0b030d1) will increase coverage by 0.01%.
The diff coverage is 0.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #415      +/-   ##
==========================================
+ Coverage   14.85%   14.86%   +0.01%     
==========================================
  Files          48       48              
  Lines        2835     2832       -3     
==========================================
  Hits          421      421              
+ Misses       2385     2382       -3     
  Partials       29       29              
Impacted Files Coverage Δ
cmd/controller/app/database/mongodb/task.go 0.00% <0.00%> (ø)

Copy link
Contributor

@myungjin myungjin left a comment

Choose a reason for hiding this comment

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

lgtm

@jaemin-shin jaemin-shin merged commit e328ebf into cisco-open:main May 17, 2023
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