[BUG] — `instance_info.selectByQuery`: fetches TEXT `instance_info` column + leading-wildcard LIKE + no pagination
- Dominant language
- Java
- Stars
- 8.8k
- Forks
- 3.1k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 85
Description
- severity: Medium-High; files: `mappers/instance-info-sqlmap.xml:80-94`; service `InstanceInfoServiceImpl.java:81-84` (no `@Pageable`)
- description: `Base_Column_List` includes `instance_info` (TEXT NOT NULL, `schema.sql:1572` holding full instance metadata JSON); `instance_ip like CONCAT('%', #{instanceIp}, '%')`; table has only PK, no index on `namespace_id`/`instance_ip`/`instance_port`/`instance_type`.
- impact: List endpoint transfers N × TEXT payloads and scans the whole namespace partition.
- suggested_fix: Exclude `instance_info` from list VO; add index on `(namespace_id, instance_type)`; add `@Pageable`.
- confidence: High
---
_Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/06-medium-tiers.md`](docs/scan2-2026-08-02/06-medium-tiers.md)._
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with mappers/instance-info-sqlmap.xml:80-94 and InstanceInfoServiceImpl.java:81-84, then inspect schema.sql:1572 and the referenced list VO. Confirm how selectByQuery builds its result and pagination behavior. Done means the list avoids transferring instance_info, uses the proposed index and pageable handling, and preserves the endpoint’s intended results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- api, backend, databases, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100