The tracking compensated for isManagedByCurrentService reporting isolated tenants
of a profile without dedicated servers as not managed (a dedicated server for any
other profile flipped it). That root cause is fixed in #16345, after which a
tenant's managed status changes only together with its own queue ownership, and
its queue keys are already in the partition change event.
Replace the test that pinned the old flip with one that checks the affected
tenants when a dedicated server for the tenant's own profile joins and leaves.
WhiteLabelingControllerTest saves the system-level login white-labeling
params with baseUrl "https://domain.com" and never restores them. The
params persist in the shared test database, so when QrCodeSettingsControllerTest
runs later in the same JVM, getBaseUrl() resolves the system base URL to
domain.com and testGetMobileDeepLink fails with
expected "localhost" but was "domain.com".
Reset system white-labeling settings after every WhiteLabelingControllerTest
test, and reset them in QrCodeSettingsControllerTest setup as well.
/api/agentInfos?agentIds=... is served by a derived JPA 'id IN (...)'
query with no ORDER BY, so PostgreSQL may return rows in any order
(e.g. physical tuple order after an UPDATE). The test asserted
infos.get(0) == first and infos.get(1) == second, and failed whenever
the rows came back reversed. Match the returned infos by id instead.
HashPartitionService.resolveByPartitionIdx caches the fallback (regular)
servers of an isolated profile without dedicated servers in
responsibleServices. isManagedByCurrentService then saw a non-empty list
for that profile and reported its tenants as not managed on the regular
servers, although those servers own the tenants' partitions. This happens
as soon as any dedicated server exists in the cluster.
Remember which profiles have dedicated servers before the fallback entries
are added, and use that set in isManagedByCurrentService.
- Resolve affected tenants in PartitionChangeEvent.getAffectedTenants(),
returning null (all tenants) for non rule engine events, empty diffs and
shared queue changes.
- HashPartitionService adds isolated tenants whose managed status changed
without a change of their own queue keys.
- PartitionChangeMsg: forAllTenants/forTenants factories instead of a null
sentinel; affected tenants excluded from toString().
- Fold the AppActor log line into the existing DefaultActorService one.
- Tests: priority ordering in ActorSystemTest, AppActorTest on a real actor
system, DefaultActorServiceTest through onTbApplicationEvent, the
managed-status scenario in HashPartitionServiceTest.
AppActor.doProcess unconditionally broadcasts PARTITION_CHANGE_MSG to
every live TenantActor at high priority, regardless of whether a given
tenant's ownership actually changed. On a shared rule-engine instance
hosting many tenants, this means any single tenant's partition change
(e.g. moving to an isolated queue) interrupts every other tenant's
in-flight message processing, even though only one tenant's ownership
changed.
DefaultActorService now resolves which tenants are actually affected
from the partition-change diff it already has on hand (returning null
when the shared/non-isolated pool itself changed, since those tenants
aren't individually tracked and everyone must still be notified), and
AppActor uses that to broadcast only to the affected tenant actors,
reusing the existing TbEntityTypeActorIdPredicate filtering idiom.
Falls back to the original broadcast-to-everyone behavior whenever the
affected set can't be narrowed down.
Calculated field actors page through each tenant's calculated fields on
startup (WHERE tenant_id = ? ORDER BY id LIMIT ?). With no index leading on
tenant_id, every page and its count query scan the whole table and sort,
so startup cost grows with tenants x table size.
Ship the index in schema-entities-idx.sql for new installs and as a new
4.4.1.0 LTS migration for existing ones (4.4.0.0 is already released, and
the range lower bound is exclusive).
Offline upgrades now accept any version of a supported LTS family (4.3.x)
instead of fixed 4.3.0/4.3.1 prefixes, and refuse an older version of the
package's own family with a pointer to the no-downtime update applied on
startup, so third-digit releases such as 4.4.1 need no upgrade script.
The CE minimum for the CE-to-PE upgrade is 4.3.1.6, the first CE release
that ships the community grant.
LtsVersion, LtsMigration and LtsMigrationService are renamed to Version,
Migration and MigrationService, and the empty upgrade/basic/schema_update.sql
placeholder is removed along with its load.
- The client origin travels on each call's start frame instead of only in
the channel's hello, so every call is audited and shown under its own
origin and a user has one channel per node whatever address they use.
TbAiClientRequest, TbAiClientRequestFactory, exactOrigin and the
per-origin handshake map are gone; the turn context holds the origin.
- Calls back into ThingsBoard forward X-Forwarded-Proto/Host/Port built
from the client origin and X-Forwarded-For from the user's address. The
browser request's X-Forwarded-* headers cannot be copied: Spring's
ForwardedHeaderFilter has already consumed them.
- Capability negotiation is dropped: protocol version 1 is the baseline,
the hello lists no capabilities and TbAiOperationsUnsupportedException
is removed.
- The on-premise token provider no longer builds an Origin handshake
header, which the channel client never sent; TB_CORE_BASE_URL no longer
affects AI.
- The AI token is read before the channel pool is used, so "AI is not
available for the current subscription plan" is a 403 again instead of
"Service unavailable", and losing AI from the plan takes effect on the
next call rather than when the pooled channel closes.
- One timer bounds the channel handshake. When it fires, the connection
leaves the pool and a WebSocket upgrade that completes later is closed
instead of staying open outside the pool.
- After shutdown the pool opens no channels, so a call refused by TB's own
1001 close is not retried. Closes with TB AI's new 4501 code (exchanges
aborted at its drain deadline) are not retried either.
GET /api/resource now accepts CUSTOMER_USER and returns only JS_MODULE
resources for them; any other requested type, or a request without
resourceType, is rejected with 403.
GET /api/resource/{type}/{scope}/{key}/info now accepts CUSTOMER_USER;
the existing per-resource check already handles customer access.
Customer TB_RESOURCE permission checker grants generic READ to any
non-public customer user, mirroring its per-resource READ rule.
Edge 4.4.0.1 moves to license client 3.0.x, which talks /api/v2/license/*.
Restores the proxy from #4306 and forwards clusterId (required by the
portal's V2 activateInstance) and protocolVersion.
* Remove IoT Hub Dashboard item type
The IoT Hub no longer has Dashboard items, so drop the DASHBOARD item type
from the platform: install/update/checksum/delete handling and the
DashboardInstalledItemDescriptor on the backend, and the item type, the
/iot-hub/dashboards page and route, deep links, translations and styles in
the UI. Dashboards created by device packages and solution templates are
not affected.
* Keep DashboardInstalledItemDescriptor for existing installed items
Installed-item rows with a DASHBOARD descriptor may still exist on
instances that were connected to the QA Hub. Without the subtype Jackson
fails on such a row and the whole Installed items page breaks, so keep the
descriptor and the delete branch to let those rows be read and removed.
* Revert "Keep DashboardInstalledItemDescriptor for existing installed items"
This reverts commit 61246776fa. A DASHBOARD installed-item row can only
exist on instances connected to the QA Hub; production and official
releases never had Dashboard items, so the legacy descriptor is not kept.
Phase 6 of the TB AI WebSocket channel. TB talks to TB AI only over the
pooled channel: SseTbAiTransport, TbAiTransportSelector, the channel
availability back-off, the HTTP fallbacks of every operation, the
TbAiClient bean and the localhost callback-origin check are removed, along
with ai.channel.enabled and ai.channel.fallback_backoff_minutes. Channel
failures are now plain errors. Requires TB AI with api.v1 and mux.v1.
Phase 5 of the TB AI WebSocket channel, TB part. TbAiChannelPool keeps one
multiplexed channel per user and client origin on each tb-core node, with
single-flight handshakes, a node-wide cap with idle eviction and transient
overflow, idle and max-age sweeping, and transient channels for background
work. Chat turns and operations run on it as exchanges keyed by op; the
remaining TB AI calls (solution creator, chat management, remote approvals,
usage, housekeeper deletions) become typed operations with the HTTP call as
fallback. An operation is retried once only when the channel did not start
it. TB_AI_* settings are now documented under ai.* in thingsboard.yml.
- Restamp ten files whose header does not match their CE provenance:
EntityDatabaseSchemaService.java, js-resource.component.ts and
DataValidationException.java are identical to CE and take the Apache
header; the 4.3.1.6 cluster migration, TbClusterStore and their tests exist
in CE lts-4.3 and common/transport/snmp/pom.xml lost a CE dependency, so they
take the ce-modified header.
- Remove the DataValidationException.java curation: CE has had an identical
file at the same path since December 2025.
- Remove 29 curations that repeat the header the check decides by itself.
- Delete trendz-settings.component.html and comparison-keys-table.component.html
at their old locations: their components moved and no longer reference them,
and the relicensing commit left only a license header in them.
- Restamp ten files whose header does not match their CE provenance:
EntityDatabaseSchemaService.java, js-resource.component.ts and
DataValidationException.java are identical to CE and take the Apache
header; the 4.3.1.6 cluster migration, TbClusterStore and their tests exist
in CE lts-4.3 and common/transport/snmp/pom.xml lost a CE dependency, so they
take the ce-modified header.
- Remove the DataValidationException.java curation: CE has had an identical
file at the same path since December 2025.
- Remove 29 curations that repeat the header the check decides by itself.
- Delete trendz-settings.component.html and comparison-keys-table.component.html
at their old locations: their components moved and no longer reference them,
and the relicensing commit left only a license header in them.
- Restamp ten files whose header does not match their CE provenance:
EntityDatabaseSchemaService.java, js-resource.component.ts and
DataValidationException.java are identical to CE and take the Apache
header; the 4.3.1.6 cluster migration, TbClusterStore and their tests exist
in CE lts-4.3 and common/transport/snmp/pom.xml lost a CE dependency, so they
take the ce-modified header.
- Remove the DataValidationException.java curation: CE has had an identical
file at the same path since December 2025.
- Remove 29 curations that repeat the header the check decides by itself.
- Delete trendz-settings.component.html and comparison-keys-table.component.html
at their old locations: their components moved and no longer reference them,
and the relicensing commit left only a license header in them.
The on-prem token provider rejected a localhost origin on every TB AI call,
so usage info, the solution creator and the WebSocket channel failed without
a configured base URL. TB AI only calls TB back at that origin on the legacy
HTTP paths, so the check now runs only before SSE chat and the HTTP fallback
of solution and dashboard operations.
Phase 4 of the TB AI WebSocket channel. Operations run over the channel
when TB AI advertises operations.v1 and fall back to the legacy HTTP
calls otherwise. TbAiChannelAvailability shares the fallback back-off
between chat and operations; TbAiClientRequestFactory resolves the
client origin for all AI controllers.
Phase 2 of the AI WebSocket channel: ChannelTbAiTransport over TbAiChannelClient,
TbAiRequestExecutor running tb.request frames on loopback as the user, TbAiTransportSelector
with SSE fallback and back-off (TB_AI_CHANNEL_ENABLED, TB_AI_CHANNEL_FALLBACK_BACKOFF_MINUTES),
approvals over the channel via TbAiChannelRegistry, clientOrigin from SystemSecurityService.
Uses thingsboard-ai common 2.1.8-SNAPSHOT.
Phase 1 of the AI WebSocket channel: TbAiTransport, TbAiTurnContext and SseTbAiTransport,
used by DefaultAiChatService inside processStream. No behavior change.