Skip to content

[#31519] Tests: Fix PgAshNestedQueryTracking on macOS by raising kNumRows#31520

Open
ellabaron-code wants to merge 1 commit into
yugabyte:masterfrom
Shopify:fix-pg-ash-test-on-macos
Open

[#31519] Tests: Fix PgAshNestedQueryTracking on macOS by raising kNumRows#31520
ellabaron-code wants to merge 1 commit into
yugabyte:masterfrom
Shopify:fix-pg-ash-test-on-macos

Conversation

@ellabaron-code
Copy link
Copy Markdown
Collaborator

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

Summary

Bumps kNumRows from 1000 to 10000 in PgAshNestedQueryTracking so the
inner trigger query stays active long enough to be sampled by ASH
(kSamplingIntervalMs = 50ms). On fast hardware (macOS arm64), 1000
trigger firings of the inner query complete inside a single sample
tick, so the sampler never catches it active and InnerAshQpmMatch()
returns 0.

Fixes #31519.

Test plan

  • On macOS arm64: ./yb_build.sh release --cxx-test pg_ash-test --gtest_filter PgAshTest.PgAshNestedQueryTracking passes.
  • On Linux: same command continues to pass (raising kNumRows only makes the inner query window larger, not smaller).

CSI

Bump kNumRows from 1000 to 10000 so the inner query is on a backend
long enough to be sampled by ASH (kSamplingIntervalMs = 50ms). On
fast hardware (macOS arm64), 1000 trigger firings of the inner
query complete inside a single sample tick, so the sampler never
catches it active and InnerAshQpmMatch() returns 0.
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 increases the kNumRows constant from 1,000 to 10,000 in the PgAshNestedQueryTracking test class within pg_ash-test.cc, likely to increase the data volume for the test case. I have no feedback to provide.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 8, 2026

Deploy Preview for infallible-bardeen-164bc9 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f760711
🔍 Latest deploy log https://app.netlify.com/projects/infallible-bardeen-164bc9/deploys/69fdef8c72c8ae000862a317
😎 Deploy Preview https://deploy-preview-31520--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.

@rahulb-yb
Copy link
Copy Markdown
Contributor

trigger jenkins

@hari90
Copy link
Copy Markdown
Contributor

hari90 commented May 8, 2026

Jenkins build has been triggered. Results will be posted once it completes. CSI


JenkinsBot

Copy link
Copy Markdown

@GauravSingh-yb GauravSingh-yb left a comment

Choose a reason for hiding this comment

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

LGTM!
Yes, the test may become flaky on faster machines.

@hari90
Copy link
Copy Markdown
Contributor

hari90 commented May 9, 2026

Jenkins build for commit f760711e: Pass
CSI

Passed: 9


🔨 DB Build/Test Job Summary

Build Total Passed Failed Failed After Retries
PR31520-alma8-clang21-tsan 43 41 0 0
PR31520-arm-alma8-clang21-release 43 43 0 0
PR31520-alma8-clang21-release 43 43 0 0
PR31520-alma8-gcc12-fastdebug 43 43 0 0
PR31520-mac14-clang21-release 2 2 0 0
PR31520-ubuntu22.04-clang21-debug 2 2 0 0
PR31520-alma9-clang21-asan 43 43 0 0
PR31520-arm-mac14-clang21-release 2 2 0 0

JenkinsBot

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.

[YSQL] PgAshNestedQueryTracking fails on macOS arm64

5 participants