-
Notifications
You must be signed in to change notification settings - Fork 848
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
Add debug utilities to debug builds #5649
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- This file and its contents are licensed under the Apache License 2.0. | ||
-- Please see the included NOTICE for copyright information and | ||
-- LICENSE-APACHE for a copy of the license. | ||
|
||
-- This file contains utility functions that are only used in debug | ||
-- builds for debugging and testing. | ||
|
||
CREATE OR REPLACE FUNCTION debug_waitpoint_enable(TEXT) RETURNS VOID LANGUAGE C VOLATILE STRICT | ||
AS '@MODULE_PATHNAME@', 'ts_debug_point_enable'; | ||
|
||
CREATE OR REPLACE FUNCTION debug_waitpoint_release(TEXT) RETURNS VOID LANGUAGE C VOLATILE STRICT | ||
AS '@MODULE_PATHNAME@', 'ts_debug_point_release'; | ||
|
||
CREATE OR REPLACE FUNCTION debug_waitpoint_id(TEXT) RETURNS BIGINT LANGUAGE C VOLATILE STRICT | ||
AS '@MODULE_PATHNAME@', 'ts_debug_point_id'; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,33 +3,9 @@ set(TEST_TEMPLATES_MODULE reorder_deadlock.spec.in | |
reorder_vs_insert_other_chunk.spec.in) | ||
|
||
set(TEST_TEMPLATES_MODULE_DEBUG | ||
reorder_vs_insert.spec.in | ||
reorder_vs_select.spec.in | ||
remote_create_chunk.spec.in | ||
dist_su_copy_chunk.spec.in | ||
dist_ha_chunk_drop.spec.in | ||
dist_restore_point.spec.in | ||
dist_cmd_exec.spec.in | ||
cagg_drop_chunks_iso.spec.in | ||
telemetry_iso.spec.in | ||
compression_chunk_race.spec.in | ||
compression_merge_race.spec.in | ||
decompression_chunk_and_parallel_query.in | ||
decompression_chunk_and_parallel_query_wo_idx.in) | ||
|
||
# These tests are using markers for the isolation tests (to avoid race | ||
# conditions causing differing output), which were added after 12.7, 13.3, and | ||
# 14.0. | ||
if(PG_VERSION VERSION_GREATER "12.7" | ||
OR PG_VERSION VERSION_GREATER "13.3" | ||
OR PG_VERSION VERSION_GREATER_EQUAL "14.0") | ||
list(APPEND TEST_TEMPLATES_MODULE_DEBUG deadlock_recompress_chunk.spec.in) | ||
endif() | ||
|
||
if(PG_VERSION VERSION_GREATER_EQUAL "14.0") | ||
list(APPEND TEST_TEMPLATES_MODULE_DEBUG freeze_chunk.spec.in | ||
compression_dml_iso.spec) | ||
endif() | ||
reorder_vs_insert.spec.in reorder_vs_select.spec.in | ||
dist_su_copy_chunk.spec.in dist_cmd_exec.spec.in | ||
decompression_chunk_and_parallel_query.in) | ||
|
||
list( | ||
APPEND | ||
|
@@ -44,7 +20,30 @@ list( | |
|
||
if(CMAKE_BUILD_TYPE MATCHES Debug) | ||
list(APPEND TEST_TEMPLATES_MODULE ${TEST_TEMPLATES_MODULE_DEBUG}) | ||
list(APPEND TEST_FILES cagg_multi_dist_ht.spec) | ||
list( | ||
APPEND | ||
TEST_FILES | ||
cagg_drop_chunks_iso.spec | ||
cagg_multi_dist_ht.spec | ||
compression_chunk_race.spec | ||
compression_merge_race.spec | ||
decompression_chunk_and_parallel_query_wo_idx.spec | ||
dist_ha_chunk_drop.spec | ||
dist_ha_chunk_drop.spec | ||
dist_restore_point.spec | ||
remote_create_chunk.spec) | ||
if(PG_VERSION VERSION_GREATER_EQUAL "14.0") | ||
list(APPEND TEST_FILES freeze_chunk.spec compression_dml_iso.spec) | ||
endif() | ||
# These tests are using markers for the isolation tests (to avoid race | ||
# conditions causing differing output), which were added after 12.7, 13.3, and | ||
# 14.0. | ||
if(PG_VERSION VERSION_GREATER "12.7" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We removed support for PG12 recenlty There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test is harmless, but it is trivial to remove. Might be good to still keep the comment though, in case anybody want to test a build with deprecated versions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Leaving it for now. It is trivial to remove, but will generate weird errors if somebody tries to use it for PG12 even though it is deprecated. |
||
OR PG_VERSION VERSION_GREATER "13.3" | ||
OR PG_VERSION VERSION_GREATER_EQUAL "14.0") | ||
list(APPEND TEST_FILES deadlock_recompress_chunk.spec) | ||
endif() | ||
|
||
endif(CMAKE_BUILD_TYPE MATCHES Debug) | ||
|
||
# need to generate MODULE name for the .spec files | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a separate setting? Maybe always enable them in Debug builds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also in favor of enabling that in every debug build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are by default enabled, and since the functions are not defined for non-debug builds, this is how it currently behaves.