Skip to content

[Bug] HStore ordered scans fail when the Gremlin sandbox denies worker creation #3214

Description

@contrueCT

Problem

HStore ordered scans can fail during Gremlin evaluation with:

SecurityException: Not allowed to access thread group via Gremlin

This was reported for six paged range-index queries while validating #2994. See the original report. The worker-creation problem is tracked separately from that PR's LABEL-query changes.

Cause and reproduction

OrderedKvIterator initializes multiple scan sources through a bounded executor whose workers are created lazily and can expire while idle. If submission requires a new worker during Gremlin evaluation, HugeSecurityManager denies thread-group access. Warming the executor at startup does not cover later worker expiry.

The failure was reproduced after syncing #2994 with master 1a15e762 (merge head bcb8c1f3), using the real GremlinGroovyScriptEngine.eval(), security manager, and production ordered iterator with controlled scan-source iterators. This is an isolated reproduction, not a rerun of the complete distributed HTTP query matrix.

Expected behavior: ordered scans complete without granting scripts thread-creation privileges, retaining ordering, limits, cursor behavior, and source cleanup.

Fix and verification

Fix PR: #3213, based directly on master. It initializes remaining sources on the caller when worker submission is denied, drains already-submitted tasks, and preserves the sandbox policy. Its description contains the flow diagram and exact test commands.

The targeted test results do not establish complete PD + three-store HTTP matrix acceptance or CI success.

Visual summary

HStore sandbox ordered scan

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions