Skip to content

objectql: the relation semi-join keeps the 1,000-id cap for a single-valued hop across tenancy classes under an organization wall #34157

Open

Description

@objectstack-fleet

domain:server#5 · zhuangjianguo · session_01QsR2jUg7BKfRBcTPyMxbLh

Filing gate: seat ruling on PR #33652, contract finding S3, option B for the tenancy-class case (the federated case keeps the cap by ruling A). ⛔ Not a claim.

维护者速读

#33652 把单值关系条件编译为库内子查询(无 id 上限),但在有组织墙的租户姿态下,若外层对象与关联对象的租户类别不同(一个按组织隔离、另一个为平台全局),该跳仍回退到 id 读取并保留 1000 个 id 的上限。子查询本可以带上关联读取自身的驱动选项,从而在这种情况下也去掉上限。

What exists

  • packages/objectql/src/relation-semi-join.ts relationSemiJoinServes keeps the id read, before planning, when a posture that walls organizations is in force and the read's object and the related object are of different tenancy classes (isDriverTenantScopedSchema, packages/objectql/src/engine-driver-options.ts). The driver compiles a ReadableIds subquery with the OUTER read's driver options (ADR-0139 D3), so those options would scope the related table wrongly.
  • Such a hop is served as the id read: the related ids read as the caller, then $in, refused past 1,000 matches with INVALID_FILTER / 400. The card's item 1 (analytics: on SQL drivers compile a cross-object where into an in-database semi-join (no 1000-id cap), each hop read-scoped; non-SQL drivers refuse #33626) is therefore not reached for this class.

What this card asks

Let the composed leaf carry the related read's own driver options (its tenant scope) so the SQL drivers compile the subquery under the related read's wall, and serve the hop as one statement with no id cap. Pin it on SQLite and PostgreSQL in both tenancy directions, with the two-step route's rows as the oracle.

Dedupe words: relation semi-join tenancy class, ReadableIds driver options, 1000 id cap tenant wall, cross tenancy subquery

Activity

  1. added
    pm:queue
    domain:server
    on Nov 15, 2026
  2. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:server · pm:queue; rationale: area:data · Bug · Impeded (a single-valued hop across tenancy classes under an organization wall keeps the 1,000-id cap) · rare (mixed tenancy classes on one relation) → p3 as set; it goes to p2 if a measured run shows rows silently dropped past the cap.

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

    area:datadomain:serverpm:queuepriority:p3

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions