fixed NP after changing tenant profile
This commit is contained in:
parent
141dc735f3
commit
acd7bd98d6
@ -50,6 +50,7 @@ public class DefaultTbTenantService implements TbTenantService {
|
|||||||
|
|
||||||
TenantProfile oldTenantProfile = oldTenant != null ? tenantProfileService.findTenantProfileById(TenantId.SYS_TENANT_ID, oldTenant.getTenantProfileId()) : null;
|
TenantProfile oldTenantProfile = oldTenant != null ? tenantProfileService.findTenantProfileById(TenantId.SYS_TENANT_ID, oldTenant.getTenantProfileId()) : null;
|
||||||
TenantProfile newTenantProfile = tenantProfileService.findTenantProfileById(TenantId.SYS_TENANT_ID, savedTenant.getTenantProfileId());
|
TenantProfile newTenantProfile = tenantProfileService.findTenantProfileById(TenantId.SYS_TENANT_ID, savedTenant.getTenantProfileId());
|
||||||
|
//TODO: send notifications before queue update
|
||||||
tbQueueService.updateQueuesByTenants(Collections.singletonList(savedTenant.getTenantId()), newTenantProfile, oldTenantProfile);
|
tbQueueService.updateQueuesByTenants(Collections.singletonList(savedTenant.getTenantId()), newTenantProfile, oldTenantProfile);
|
||||||
return savedTenant;
|
return savedTenant;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -155,6 +155,8 @@ public class HashPartitionService implements PartitionService {
|
|||||||
myPartitions.remove(queueKey);
|
myPartitions.remove(queueKey);
|
||||||
partitionTopicsMap.remove(queueKey);
|
partitionTopicsMap.remove(queueKey);
|
||||||
partitionSizesMap.remove(queueKey);
|
partitionSizesMap.remove(queueKey);
|
||||||
|
//TODO: remove after merging tb entity services
|
||||||
|
removeTenant(tenantId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -172,10 +174,10 @@ public class HashPartitionService implements PartitionService {
|
|||||||
|
|
||||||
//TODO: replace if we can notify CheckPoint rule nodes about queue changes
|
//TODO: replace if we can notify CheckPoint rule nodes about queue changes
|
||||||
if (queueRoutingInfo == null) {
|
if (queueRoutingInfo == null) {
|
||||||
log.warn("Queue was removed but still used in CheckPoint rule node. [{}][{}]", tenantId, entityId);
|
log.debug("Queue was removed but still used in CheckPoint rule node. [{}][{}]", tenantId, entityId);
|
||||||
queueKey = getMainQueueKey(serviceType, tenantId);
|
queueKey = getMainQueueKey(serviceType, tenantId);
|
||||||
} else if (!queueRoutingInfo.getTenantId().equals(getIsolatedOrSystemTenantId(serviceType, tenantId))) {
|
} else if (!queueRoutingInfo.getTenantId().equals(getIsolatedOrSystemTenantId(serviceType, tenantId))) {
|
||||||
log.warn("Tenant profile was changed but CheckPoint rule node still uses the queue from system level. [{}][{}]", tenantId, entityId);
|
log.debug("Tenant profile was changed but CheckPoint rule node still uses the queue from system level. [{}][{}]", tenantId, entityId);
|
||||||
queueKey = getMainQueueKey(serviceType, tenantId);
|
queueKey = getMainQueueKey(serviceType, tenantId);
|
||||||
} else {
|
} else {
|
||||||
queueKey = new QueueKey(serviceType, queueRoutingInfo);
|
queueKey = new QueueKey(serviceType, queueRoutingInfo);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user