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

perf: skip index creation for replicated table #274

Merged
merged 7 commits into from
Dec 9, 2024
Merged

Conversation

fanyang01
Copy link
Collaborator

@fanyang01 fanyang01 commented Dec 9, 2024

Ref: #272

@fanyang01 fanyang01 requested a review from Copilot December 9, 2024 11:31
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 9 changed files in this pull request and generated 1 suggestion.

Files not reviewed (4)
  • catalog/database.go: Evaluated as low risk
  • replica/replication.go: Evaluated as low risk
  • catalog/table.go: Evaluated as low risk
  • pgserver/logrepl/ddl.go: Evaluated as low risk
Comments skipped due to low confidence (3)

configuration/env.go:9

  • The constant name replicationWithoutIndex should be in uppercase to follow Go naming conventions. Rename it to REPLICATION_WITHOUT_INDEX.
replicationWithoutIndex = "REPLICATION_WITHOUT_INDEX"

pgserver/logrepl/replication_test.go:748

  • The comment should explicitly mention why the primary key index is being removed from the replica table when the environment variable is set.
if target == "replica" && configuration.IsReplicationWithoutIndex() {

pgserver/logrepl/replication_test.go:747

  • Ensure that test cases cover both scenarios: when the environment variable is set and when it is not set.
target, _ := clientSpecFromQueryComment(query)

delta/controller.go Outdated Show resolved Hide resolved
@fanyang01 fanyang01 requested a review from VWagen1989 December 9, 2024 15:01
Copy link
Contributor

@VWagen1989 VWagen1989 left a comment

Choose a reason for hiding this comment

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

Great job! LGTM! I'll test the replication performance after this PR is merged.

@fanyang01 fanyang01 merged commit 2950610 into main Dec 9, 2024
10 checks passed
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.

2 participants