getAllServiceIds() rebuilds two HashSets just to test membership of a
single id - PartitionService#isKnownServiceId scans the live service
lists directly instead, for the hot path in DefaultTbClusterService's
per-notification unknown-service guard. SetCache.boundedBySize() adds
an LRU-by-size variant alongside the existing TTL-based constructor.
- Extend the unknown-service-id orphan-topic guard to pushNotificationToTransport
- Make HashPartitionService.currentOtherServices volatile (now read on the
per-notification path, written under the synchronized recalculatePartitions)
- Lower the per-skip log from warn to debug to avoid noise when stale service
ids appear in message metadata during normal operation
- Add tests for the transport guard (unknown skipped, known sent)
The tests run ZkDiscoveryService against an embedded ZooKeeper server
and check that the current node is registered once with a protected
node name and is excluded from other servers, both after start and
after a session expiry.
The delayed recalculation task is scheduled and stored in delayed tasks atomically, so a task started with zero delay always finds itself in delayed tasks and does not skip the recalculation.
The current node ZK node is created with Curator protection, so a create
retried after a connection loss reuses the node already created by the
lost attempt, and a node left by a failed create is deleted in the
background instead of staying registered for the lifetime of the session.
Other servers list excludes ZK nodes carrying the current service id and
keeps a single, most recently modified, ZK node per service id, so every
node builds the same partition ring when a service has duplicate
registrations.
Cache events for ZK nodes with the current service id are ignored, with
an error logged when such a node appears. Removal of a duplicate ZK node
of another service no longer publishes a shutdown event while that
service is still registered.
* 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.
Publish creates a new ZK node only when the current one is definitely
absent or owned by another session. An existing node of the current
session is updated in place regardless of its data, and a failed
existence check skips the publish cycle instead of creating a node.