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

PG17 - Add Regression Test for REINDEX support in event triggers #7819

Open
wants to merge 1 commit into
base: release-13.0
Choose a base branch
from

Conversation

m3hm3t
Copy link
Contributor

@m3hm3t m3hm3t commented Dec 27, 2024

This PR adds regression tests to verify REINDEX support with event triggers. Tests validates trigger execution, shard placement consistency, and distributed index rebuilding without disruption.

@m3hm3t m3hm3t self-assigned this Dec 27, 2024
Copy link

codecov bot commented Dec 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (release-13.0@103125f). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff               @@
##             release-13.0    #7819   +/-   ##
===============================================
  Coverage                ?   89.63%           
===============================================
  Files                   ?      274           
  Lines                   ?    59748           
  Branches                ?     7452           
===============================================
  Hits                    ?    53558           
  Misses                  ?     4059           
  Partials                ?     2131           

@m3hm3t m3hm3t requested a review from naisila December 30, 2024 08:18
@m3hm3t m3hm3t marked this pull request as ready for review December 30, 2024 08:18
@m3hm3t m3hm3t marked this pull request as draft December 30, 2024 08:19
Copy link
Member

@naisila naisila left a comment

Choose a reason for hiding this comment

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

LGTM, @onurctirtir can you give a second look?
Basically, do you see any issue with having start-end event triggers for a REINDEX command on a distributed table? We don't distribute event triggers currently in Citus, but I think it's okay to have unpropagated start-end event trigger for a propagated reindex command?

@onurctirtir
Copy link
Member

onurctirtir commented Dec 30, 2024

LGTM, @onurctirtir can you give a second look? Basically, do you see any issue with having start-end event triggers for a REINDEX command on a distributed table? We don't distribute event triggers currently in Citus, but I think it's okay to have unpropagated start-end event trigger for a propagated reindex command?

For reindex commands, the way that Citus acts when "concurrently" option is provided is a bit tricky. So, as long as we also add a test where we provide "concurrently" option to "reindex" command, we should be okay at the high level.

See ExecuteDistributedDDLJob().

@m3hm3t m3hm3t force-pushed the m3hm3t/event_reindex_pg17 branch 2 times, most recently from 32012cb to 886497e Compare December 30, 2024 15:32
@naisila
Copy link
Member

naisila commented Dec 30, 2024

@onurctirtir

For reindex commands, the way that Citus acts when "concurrently" option is provided is a bit tricky. So, as long as we also add a test where we provide "concurrently" option to "reindex" command, we should be okay at the high level.

Do you have in mind an isolation test?

@onurctirtir
Copy link
Member

@onurctirtir

For reindex commands, the way that Citus acts when "concurrently" option is provided is a bit tricky. So, as long as we also add a test where we provide "concurrently" option to "reindex" command, we should be okay at the high level.

Do you have in mind an isolation test?

I think we don't need to add an isolation test. If we can just use "concurrently" syntax in one of our tests, that should also be fine. This is because, in the past, even simply providing "concurrently" option was causing indefinite self deadlocks or sometimes crashes for create index / reindex commands in Citus.

@m3hm3t m3hm3t force-pushed the m3hm3t/event_reindex_pg17 branch 2 times, most recently from 6a9dd84 to 2303b23 Compare December 31, 2024 14:20
@naisila naisila marked this pull request as ready for review December 31, 2024 14:38
CONCURRENTLY update

update
@m3hm3t m3hm3t force-pushed the m3hm3t/event_reindex_pg17 branch from 2303b23 to f810a17 Compare December 31, 2024 15:08
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.

3 participants