Skip to content

[#31497] tserver: Fix OpenTableFailureDuringPerform on macOS#31498

Open
ellabaron-code wants to merge 2 commits into
yugabyte:masterfrom
Shopify:fix-open-table-failure-test-on-macos
Open

[#31497] tserver: Fix OpenTableFailureDuringPerform on macOS#31498
ellabaron-code wants to merge 2 commits into
yugabyte:masterfrom
Shopify:fix-open-table-failure-test-on-macos

Conversation

@ellabaron-code
Copy link
Copy Markdown
Collaborator

@ellabaron-code ellabaron-code commented May 7, 2026

Summary

FLAGS_TEST_request_unknown_tables_during_perform was honoured only inside DoHandleSharedExchangeQuery — the shared-memory IPC path. On macOS that path is disabled (pg_client_use_shared_memory defaults to !yb::kIsMac), so requests are served by PgClientServiceImpl::Perform instead, which never read the flag. As a result every SELECT in PgMiniTest.OpenTableFailureDuringPerform succeeded and the final ASSERT_TRUE(has_object_not_found_errors) failed.

Move the injection into PreparePgTablesQuery, which both transports go through (DoHandleSharedExchangeQuery for shared memory, PgClientServiceImpl::Perform for RPC). The test now exercises the failure path on both platforms.

Fixes #31497.

Test plan

  • pgwrapper_pg_mini-test --gtest_filter=PgMiniTest.OpenTableFailureDuringPerform passes on macOS (previously failing)
  • Same test still passes on Linux (no regression on the shared-memory path)

FLAGS_TEST_request_unknown_tables_during_perform was applied only inside
DoHandleSharedExchangeQuery — the shared-memory IPC path. On macOS that
path is disabled (pg_client_use_shared_memory defaults to !yb::kIsMac),
so the test injection had no effect, every SELECT succeeded, and the
final ASSERT_TRUE(has_object_not_found_errors) failed.

Move the injection into PreparePgTablesQuery, which both transports use
(DoHandleSharedExchangeQuery for shared memory, PgClientServiceImpl::
Perform for RPC). The test now exercises the failure path on both
platforms.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 7, 2026

Deploy Preview for infallible-bardeen-164bc9 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 5de9f85
🔍 Latest deploy log https://app.netlify.com/projects/infallible-bardeen-164bc9/deploys/69fd096101e6670008ff5746
😎 Deploy Preview https://deploy-preview-31498--infallible-bardeen-164bc9.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the handling of test table IDs by moving the logic from PgClientSession::Impl into the PreparePgTablesQuery function. The reviewer suggested using AddIfMissing instead of insert when adding these test IDs to maintain consistency with the existing logic and to prevent duplicate entries in the table list.

Comment thread src/yb/tserver/pg_client_session.cc
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.

[DocDB] PgMiniTest.OpenTableFailureDuringPerform fails on macOS

2 participants