[#31497] tserver: Fix OpenTableFailureDuringPerform on macOS#31498
Open
ellabaron-code wants to merge 2 commits into
Open
[#31497] tserver: Fix OpenTableFailureDuringPerform on macOS#31498ellabaron-code wants to merge 2 commits into
ellabaron-code wants to merge 2 commits into
Conversation
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>
✅ Deploy Preview for infallible-bardeen-164bc9 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FLAGS_TEST_request_unknown_tables_during_performwas honoured only insideDoHandleSharedExchangeQuery— the shared-memory IPC path. On macOS that path is disabled (pg_client_use_shared_memorydefaults to!yb::kIsMac), so requests are served byPgClientServiceImpl::Performinstead, which never read the flag. As a result everySELECTinPgMiniTest.OpenTableFailureDuringPerformsucceeded and the finalASSERT_TRUE(has_object_not_found_errors)failed.Move the injection into
PreparePgTablesQuery, which both transports go through (DoHandleSharedExchangeQueryfor shared memory,PgClientServiceImpl::Performfor RPC). The test now exercises the failure path on both platforms.Fixes #31497.
Test plan
pgwrapper_pg_mini-test --gtest_filter=PgMiniTest.OpenTableFailureDuringPerformpasses on macOS (previously failing)