[CELEBRON-1285] Add check tenantConfig.getConfigs().isEmpty() in getTenantUserConfigFromCache

### What changes were proposed in this pull request?

 Add check tenantConfig.getConfigs().isEmpty() in getTenantUserConfigFromCache

### Why are the changes needed?

 Add check tenantConfig.getConfigs().isEmpty() in getTenantUserConfigFromCache

### Does this PR introduce _any_ user-facing change?

NO

### How was this patch tested?

PASS GA

Closes #2324 from jiaoqingbo/1285.

Authored-by: jiaoqingbo <1178404354@qq.com>
Signed-off-by: waitinfuture <zky.zhoukeyong@alibaba-inc.com>
This commit is contained in:
jiaoqingbo 2024-02-25 22:20:41 +08:00 committed by waitinfuture
parent ac5fad53b6
commit 96344561e8

View File

@ -94,7 +94,7 @@ public interface ConfigService {
*/
default DynamicConfig getTenantUserConfigFromCache(String tenantId, String userId) {
TenantConfig tenantConfig = getRawTenantUserConfigFromCache(tenantId, userId);
if (tenantConfig == null) {
if (tenantConfig == null || tenantConfig.getConfigs().isEmpty()) {
return getTenantConfigFromCache(tenantId);
} else {
return tenantConfig;