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

[DocDB] Improve Readability and Maintainability of CDCServiceImpl::PopulateTabletCheckPointInfo #23301

Closed
1 task done
yusong-yan opened this issue Jul 29, 2024 · 0 comments
Closed
1 task done
Assignees
Labels
area/docdb YugabyteDB core features kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue

Comments

@yusong-yan
Copy link
Contributor

yusong-yan commented Jul 29, 2024

Jira Link: DB-12223

Description

PopulateTabletCheckPointInfo function is is excessively long, complex, and intertwined with logic for both XCluster and CDCSDK, which make it difficult to understand and maintain.

Issue Type

kind/enhancement

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@yusong-yan yusong-yan added area/docdb YugabyteDB core features status/awaiting-triage Issue awaiting triage labels Jul 29, 2024
@yusong-yan yusong-yan self-assigned this Jul 29, 2024
@yugabyte-ci yugabyte-ci added kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue and removed status/awaiting-triage Issue awaiting triage labels Jul 29, 2024
yusong-yan added a commit that referenced this issue Aug 2, 2024
…abletCheckPointInfo in CDCService

Summary:
This diff refactored the function `PopulateTabletCheckPointInfo` for improving the readability and maintainability. The function was previously complex and too long, which made it difficult to understand and maintain. To address this, some of its code has been moved to a newly created function named `ProcessEntry`.
Also, `PopulateTabletCheckPointInfo` can no longer used for populating a certain CDCSDK tablet, and a new function `PopulateCDCSDKTabletCheckPointInfo` has been introduced.

Furthermore, this refactoring also aims to separate code of XCluster and CDCSDK. The plan is to further divide the `ProcessEntry` function into `ProcessEntryForXCluster` and `ProcessEntryForCDCSDK` to effectively manage and understand the functionality of xCluster and CDCSDK n the CDCService.
Jira: DB-12223

Test Plan: Jenkins

Reviewers: hsunder, stiwary

Reviewed By: stiwary

Subscribers: ycdcxcluster, hsunder

Differential Revision: https://phorge.dev.yugabyte.com/D36867
jasonyb pushed a commit that referenced this issue Aug 3, 2024
Summary:
 23b908e [PLAT-14624] skip deleting key pair from cloud in case skipKeyPairValidate is enabled
 f7579a4 [PLAT-14671] Update prometheus version
 e290d8e [PLAT-14670] Upgrade postgres version
 652b424 New Tutorial for Elixir Using Phoenix Framework (#23284)
 a9e2c39 [PLAT-14814] Create universe failure with locale
 e445f75 [#23216]yugabyted: API implementation for assessment UI sub pages.
 e1dfdd4 [yugabyted][UI] Migration assessment source DB and recommendation details (#23238)
 ed2aae0 [PLAT-13865] Use rpc Port for fetching the certificate
 b27c51b [#23098] DocDB: yb-admin commands to dump and update sys catalog catalog entities
 0589d5a [#23301] docdb: Improved Readability and Maintainability of PopulateTabletCheckPointInfo in CDCService
 f7e36ef [PLAT-14673] correct the usage for ssh user during otel collector task
 b4a5c4b [#23318] YSQL: pg_partman: Disable pg_advisory_unlock calls
 cdef6d3 [PLAT-14299] [API] Improvements to roll N nodes at a time

Test Plan: Jenkins: rebase: pg15-cherrypicks

Reviewers: jason, tfoucher

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D37023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue
Projects
None yet
Development

No branches or pull requests

2 participants