Conversation
11 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3213 +/- ##
============================================
- Coverage 37.90% 37.90% -0.01%
Complexity 6600 6600
============================================
Files 800 800
Lines 69035 69035
Branches 9186 9186
============================================
- Hits 26167 26165 -2
Misses 39795 39795
- Partials 3073 3075 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
5 tasks
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.
Purpose of the PR
Fixes #3214.
Fix the ordered-scan worker-creation failure reported in #2994, independently of its LABEL-query changes. This branch starts from master
1a15e762.HStore's
OrderedKvIteratorprimes multiple scan sources with a bounded executor. Its workers are created lazily and expire when idle. Creating a worker under Gremlin evaluation can raiseSecurityException: Not allowed to access thread group via Gremlin. Merely constructing or warming the pool at startup does not cover later worker expiry.Main Changes
SecurityException, initialize the remaining sources on the calling thread for that iterator. Stop retrying the denied executor, and drain any already-submitted tasks before completing initialization.HugeSecurityManager, add package allowlists, or grant scripts thread-creation privileges. The fallback may increase first-result latency when a sandbox denies worker creation; no performance improvement is claimed.The diagram shows the changed failure path; no new privileges are introduced:
flowchart TB G[Gremlin evaluation] --> O[OrderedKvIterator initialization] O --> S[Submit source initialization] S --> Q{Submission permitted?} Q -->|Yes| W[Bounded worker initialization] Q -->|SecurityException - before| E[Query fails] Q -->|SecurityException - after| C[Initialize remaining sources on caller] W --> D[Drain submitted tasks] C --> D D --> M[Sorted merge with existing limit and cursor] U[Script creates a thread directly] --> B[Still denied by sandbox]Verifying these changes
The failure was reproduced on #2994 after merging master (
bcb8c1f3), using the realGremlinGroovyScriptEngine.eval(),HugeSecurityManager, and productionOrderedKvIterator, with controlled scan-source iterators. The new security tests also cover a worker expiring before the next query and confirm direct thread creation, including through the store-client thread factory, remains denied. They are registered inUnitTestSuite.Iterator regressions cover denied submission before/after a prior submission, a still-running source, sorted results, source errors, source security exceptions, interruption, and closure even when cancellation is denied. Existing concurrency, saturation, limit, and cursor tests remain in the suite.
Passed on the SSH test host with Java 11: 15 security tests and 20 unique iterator tests, with no failures or skips. Formatting and the all-module clean compilation also passed. Commands (without style or coverage skips):
This is an isolated sandbox/iterator reproduction and regression suite, not a rerun of the reporter's complete PD + three-store HTTP paging matrix. That matrix should be repeated after this fix is integrated into #2994. CI results are not claimed here.
Does this PR potentially affect the following parts?
Documentation Status
Doc - TODODoc - DoneDoc - No NeedNo public API or configuration change. The internal fallback and its latency trade-off are described above and in code.
Visual summary