Skip to content

[BUG] Oracle instance status persistence uses an unsupported LIMIT clause #7724

Closed

Description

@Aias00

Current behavior

InstanceInfoServiceImpl.createOrUpdate first executes InstanceInfoMapper.selectOneByQuery. Its only mapped statement ends with LIMIT 1 and has no Oracle-specific databaseId variant. Oracle does not support this syntax, so the instance persistence path cannot perform the identity lookup on an Oracle deployment.

The same mapper already has an Oracle-specific existed statement using ROWNUM = 1, demonstrating the available dialect pattern. Failure before the insert/update also interacts with the unguarded periodic persistence task tracked by #6496.

Source evidence

Confirmed mapped SQL shape by local XML inspection; no Oracle server was run during issue preparation.

Acceptance criteria

  • Supply supported Oracle syntax for selectOneByQuery, preserving all identity/namespace predicates and single-row behavior.
  • Retain working mappings for the other supported dialects.
  • Validate Oracle mapped-statement selection and execute the instance lookup/create/update path on the supported Oracle test environment.
  • Verify null/optional filters follow the existing query contract without broadening matches.
  • Add regression coverage preventing generic LIMIT syntax from being selected for Oracle.

Related: #6496 covers scheduled task resilience and must not be treated as the SQL fix.

Activity

  1. konlue commented on Oct 17, 2026

    @konlue
    Contributor

    /assign

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions