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: revamp update mechanism of session & kernel status #2311

Merged
merged 3 commits into from
Sep 13, 2024

Conversation

fregataa
Copy link
Member

@fregataa fregataa commented Jun 18, 2024

resolves #2266

Changes

Update kernel status to {PREPARING,PULLING,RUNNING,TERMINATING}

  1. When a manager consumes Kernel{PREPARING,PULLING,RUNNING,TERMINATING}Event, set the status of kernel to the given status and save session_id of the kernel to Redis. - SADD command is used here
  2. Among managers, update_session_status() task is triggered by a global timer. The task fetches session_ids from Redis that saved in step 2.
  3. The task fetches session rows & binding kernel rows from DB and calculates the session status.
  4. Update the calculated session status to DB.

Update kernel status to else status ...

Just set the status of session & kernels to the given status.

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version
  • Mention to the original issue
  • API server-client counterparts (e.g., manager API -> client SDK)

Copy link
Member Author

fregataa commented Jun 18, 2024

Copy link

graphite-app bot commented Jun 18, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@fregataa fregataa force-pushed the topic/06-18-chore_impl_status-update_interface_for_orm_objects branch from 1c1e3cf to 8003d51 Compare June 18, 2024 14:53
@fregataa fregataa force-pushed the topic/06-18-refactor_session_kernel_status_management branch from 5be5355 to 19d43d3 Compare June 18, 2024 14:53
@github-actions github-actions bot added size:XL 500~ LoC and removed size:L 100~500 LoC labels Jun 18, 2024
@fregataa fregataa force-pushed the topic/06-18-refactor_session_kernel_status_management branch from 19d43d3 to f0372b0 Compare June 18, 2024 14:59
@fregataa fregataa force-pushed the topic/06-18-chore_impl_status-update_interface_for_orm_objects branch from 3b05b02 to db325fc Compare June 21, 2024 05:10
@fregataa fregataa force-pushed the topic/06-18-refactor_session_kernel_status_management branch from f0372b0 to 61bd7ea Compare June 21, 2024 05:10
@fregataa fregataa force-pushed the topic/06-18-chore_impl_status-update_interface_for_orm_objects branch 2 times, most recently from 1d05f0a to 4552c99 Compare June 24, 2024 07:05
@fregataa fregataa force-pushed the topic/06-18-chore_impl_status-update_interface_for_orm_objects branch 2 times, most recently from 8692aa4 to 3e068ad Compare July 11, 2024 09:44
@fregataa fregataa added this to the 24.09 milestone Jul 11, 2024
@fregataa fregataa force-pushed the topic/06-18-chore_impl_status-update_interface_for_orm_objects branch from 3e068ad to 55d44af Compare July 11, 2024 09:51
@fregataa fregataa changed the base branch from topic/06-18-chore_impl_status-update_interface_for_orm_objects to main July 11, 2024 09:55
@fregataa fregataa force-pushed the topic/06-18-refactor_session_kernel_status_management branch from 61bd7ea to 93d0fdd Compare July 11, 2024 10:24
@fregataa fregataa force-pushed the topic/06-18-refactor_session_kernel_status_management branch from 93d0fdd to 41bd330 Compare July 26, 2024 15:06
@fregataa fregataa changed the title refactor: revamp session and kernel status update mechanism refactor: revamp update mechanism of session & kernel status Jul 26, 2024
@fregataa fregataa force-pushed the topic/06-18-refactor_session_kernel_status_management branch from 41bd330 to 0bbc034 Compare July 26, 2024 15:28
@fregataa fregataa marked this pull request as ready for review July 26, 2024 15:29
@fregataa fregataa force-pushed the topic/06-18-refactor_session_kernel_status_management branch 3 times, most recently from 49e38c7 to 59f97da Compare August 16, 2024 05:48
@fregataa fregataa force-pushed the topic/06-18-refactor_session_kernel_status_management branch from 59f97da to 3261dd1 Compare August 19, 2024 10:55
@fregataa fregataa force-pushed the topic/06-18-refactor_session_kernel_status_management branch 2 times, most recently from 24f9ec9 to 60c3131 Compare August 31, 2024 16:15
@fregataa fregataa force-pushed the topic/06-18-refactor_session_kernel_status_management branch 7 times, most recently from db64ef9 to ba6bd3d Compare September 6, 2024 13:17
@fregataa fregataa force-pushed the topic/06-18-refactor_session_kernel_status_management branch from ba6bd3d to a0b81d5 Compare September 10, 2024 10:34
@fregataa fregataa force-pushed the topic/06-18-refactor_session_kernel_status_management branch 2 times, most recently from 5a17c2f to 6b455ba Compare September 13, 2024 09:05
@fregataa fregataa force-pushed the topic/06-18-refactor_session_kernel_status_management branch from 6b455ba to d481394 Compare September 13, 2024 09:31
@fregataa fregataa added this pull request to the merge queue Sep 13, 2024
Merged via the queue into main with commit 195261c Sep 13, 2024
24 checks passed
@fregataa fregataa deleted the topic/06-18-refactor_session_kernel_status_management branch September 13, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:common Related to Common component comp:manager Related to Manager component size:XL 500~ LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor kernel/session status update APIs
1 participant