Skip to content

[BUG] Instance list dereferences missing local heartbeat state on non-master Admin nodes #7697

Closed

Description

@Aias00

Current behavior

The instance list loads database rows, looks up each row in the local InstanceCheckService map, then dereferences the result without checking for null. In cluster mode, InstanceCheckService.setup() runs after master election; a follower need not have populated this map. The default cluster forwarding list does not include /instance/**. A follower querying shared database records can therefore hit a null heartbeat entry and fail the whole page. A full two-node reproduction is still required; the null dereference and missing-map case are visible in source.

Other evidence: ShenyuClusterService.doSelectMaster:75-89, ClusterForwardFilter:99-118, and application.yml cluster forwarding defaults. The same mismatch can occur for a row inserted after this JVM loaded its initial snapshot.

Acceptance criteria

  • Controller regression: a database row absent from the local map does not fail the page.
  • Define authoritative status behavior: use an explicit persisted/stale fallback or route status reads to the appropriate authority; do not fabricate a fresh ONLINE state.
  • Test two Admin nodes with shared storage, follower reads, newly persisted rows and master failover.
  • Preserve namespace filtering and distinguish fresh observations from stored status.
  • Keep this separate from [BUG] Instance health DB sync scheduler can stop after one persistence error #6496, which concerns persistence-scheduler failure.

Source evidence

Reviewed source. Baseline: b4e115367fd57adc8aba332d655b1009932ba394. Report based on source inspection; no runtime reproduction was executed during issue preparation.

Activity

  1. added
    type: bug
    on Oct 17, 2026
  2. imDwAaY commented on Oct 19, 2026

    @imDwAaY
    Contributor

    /assign

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

Metadata

Metadata

Assignees

Labels

admintype: bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions