Skip to content

Tests: Use AtomicInteger to prevent races in BaseKnnVectorQueryTestCase - #16786

Open
spinscale wants to merge 1 commit into
apache:mainfrom
spinscale:tests-use-atomic-integer-in-baseknnvectorquerytestcase
Open

spinscale wants to merge 1 commit into
apache:mainfrom
spinscale:tests-use-atomic-integer-in-baseknnvectorquerytestcase

Conversation

@spinscale

Copy link
Copy Markdown
Contributor

Description

Our test infra uncovered this one, even though it is not reproducible with a specific seed. Repro line was and it failed here

gradlew test --tests TestPatienceByteVectorQuery.testTimeout -Dtests.seed=FBD756AC771CE347 -Dtests.locale=agq-Latn-CM -Dtests.timezone=Etc/Zulu -Dtests.asserts=true -Dtests.file.encoding=UTF-8

To my understanding shouldExit can be called with with TaskExecutor, so decrementing the integer is not safe in this case.

@dweiss

dweiss commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Does it apply to 10x? Please set the milestone too.

@spinscale

spinscale commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Yes, the TaskExecutor in AbstractKnnVectorQuery is also called in 10x. Thanks for pointing it out!

I cannot set any labels/milestones in GitHub though, if you're referring to that.

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.

2 participants