Skip to content

[#1][WIFI-15157][OpenLAN CGW] Resolved shard ownership of infra on device connection#155

Open
nitin-ra wants to merge 1 commit intoTelecominfraproject:mainfrom
routerarchitects:wifi-15157-fix-shard-ownership
Open

[#1][WIFI-15157][OpenLAN CGW] Resolved shard ownership of infra on device connection#155
nitin-ra wants to merge 1 commit intoTelecominfraproject:mainfrom
routerarchitects:wifi-15157-fix-shard-ownership

Conversation

@nitin-ra
Copy link

Root cause:

  • Each shard caches only its own details.
  • When an AP (gateway) connects to a non-owner shard, that shard cannot determine whether the device is truly unassigned or owned by another shard.

Solution:

  • On local cache miss, query Redis/DB for existing infra group.
  • Resolve ownership: emit Kafka event (foreign/unassigned).
  • Purge the device from all shard Redis caches to prevent stale entries.

Test:

  • Build passes OK!.
  • Verified no regression.

…vice connection

Root cause:
- Each shard caches only its own details.
- When an AP (gateway) connects to a non-owner shard, that shard cannot determine
  whether the device is truly unassigned or owned by another shard.

Solution:
- On local cache miss, query Redis/DB for existing infra group.
- Resolve ownership: emit Kafka event (foreign/unassigned).
- Purge the device from all shard Redis caches to prevent stale entries.

Test:
- Build passes OK!.
- Verified no regression.

Signed-off-by: Avinash-Gahlowt <avinash32.gahlowt@routerarchitects.com>
@jaspreetsachdev
Copy link
Collaborator

@i-chvets @acapparelli please take the PR and check.

@jaspreetsachdev
Copy link
Collaborator

@phwhite Is this PR within the design of this component?

@Cahb
Copy link
Contributor

Cahb commented Oct 2, 2025

Hi @nitin-ra
The conceptual changes seem OK, apart from the

Purge the device from all shard Redis caches to prevent stale entries
As each CGW should maintain only local cache, it's part of the design core;

But i think here it's fine;

Apart from that, while CGW can function without the proxy application, i'd recommend investing some time into the proxy app that comes with this repo; The proxy is responsible as well for coordinating which or devices should connect where;

As for this PR in particular, i think we have to agree what to do next: Paul proposed to conduct a meeting (see Slack message);

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants