Two classes used its @PostConstruct and @PreDestroy; they use the jakarta.annotation ones instead, which Spring handles the same way. proto and edge-api declared it for generated gRPC code that no longer uses it: gRPC 1.76 marks its stubs with @GrpcGenerated.
Google libraries still bring it transitively.
Migrations started from @PostConstruct ran before Spring registered
@TransactionalEventListener methods, so cache evict events published by
migrations were dropped. With a Redis cache the stale entry survived until
its TTL (e.g. the internal Trendz API key kept its pre-migration
permissions for up to 24 hours).
Start the patch applier on ApplicationReadyEvent with the new
AfterStartUp.SYSTEM_PATCH order (0), so it is still submitted before
partitions, discovery, core and actor startup.
Integration executors loaded the rule engine queues only at startup and never
evicted the cached tenant routing info. After a tenant switched to or from an
isolated rule engine they kept pushing its uplinks to the old queue until restart.
- send queue update/delete notifications to integration executors
(new repeated fields 2 and 3 in ToIntegrationExecutorNotificationMsg)
- apply them in DefaultClusterIntegrationService
- evict tenant routing info on TENANT / TENANT_PROFILE events, after the
tenant profile caches (new PartitionService.evictTenantProfileInfo)
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 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.
After the managed-status fix the field was only written, never read. It
also held the fallback entries added by resolveByPartitionIdx, so reading
it later as "profiles with dedicated servers" would bring the bug back.
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.
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.
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.