changed log level and wrote description for yml variables

This commit is contained in:
IrynaMatveieva 2025-04-11 13:43:17 +03:00
parent 870dc1b4c4
commit 1ad2acc27c
4 changed files with 4 additions and 8 deletions

View File

@ -64,7 +64,7 @@ public class DefaultCalculatedFieldCache implements CalculatedFieldCache {
private final ConcurrentMap<EntityId, List<CalculatedFieldLink>> entityIdCalculatedFieldLinks = new ConcurrentHashMap<>(); private final ConcurrentMap<EntityId, List<CalculatedFieldLink>> entityIdCalculatedFieldLinks = new ConcurrentHashMap<>();
private final ConcurrentMap<CalculatedFieldId, CalculatedFieldCtx> calculatedFieldsCtx = new ConcurrentHashMap<>(); private final ConcurrentMap<CalculatedFieldId, CalculatedFieldCtx> calculatedFieldsCtx = new ConcurrentHashMap<>();
@Value("${calculatedField.initFetchPackSize:50000}") @Value("${queue.calculated_fields.init_fetch_pack_size:50000}")
@Getter @Getter
private int initFetchPackSize; private int initFetchPackSize;

View File

@ -175,7 +175,7 @@ public class DefaultTbCalculatedFieldConsumerService extends AbstractPartitionBa
packSubmitFuture.cancel(true); packSubmitFuture.cancel(true);
log.info("Timeout to process message: {}", pendingMsgHolder.getMsg()); log.info("Timeout to process message: {}", pendingMsgHolder.getMsg());
} }
ctx.getAckMap().forEach((id, msg) -> log.debug("[{}] Timeout to process message: {}", id, msg.getValue())); ctx.getAckMap().forEach((id, msg) -> log.warn("[{}] Timeout to process message: {}", id, msg.getValue()));
ctx.getFailedMap().forEach((id, msg) -> log.warn("[{}] Failed to process message: {}", id, msg.getValue())); ctx.getFailedMap().forEach((id, msg) -> log.warn("[{}] Failed to process message: {}", id, msg.getValue()));
} }
consumer.commit(); consumer.commit();

View File

@ -1848,9 +1848,9 @@ queue:
pool_size: "${TB_QUEUE_CF_POOL_SIZE:8}" pool_size: "${TB_QUEUE_CF_POOL_SIZE:8}"
# RocksDB path for storing CF states # RocksDB path for storing CF states
rocks_db_path: "${TB_QUEUE_CF_ROCKS_DB_PATH:${user.home}/.rocksdb/cf_states}" rocks_db_path: "${TB_QUEUE_CF_ROCKS_DB_PATH:${user.home}/.rocksdb/cf_states}"
# The fetch size specifies how many rows will be returned # The fetch size specifies how many rows will be fetched from the database per request for initial fetching
init_fetch_pack_size: "${TB_QUEUE_CF_FETCH_PACK_SIZE:50000}" init_fetch_pack_size: "${TB_QUEUE_CF_FETCH_PACK_SIZE:50000}"
# The fetch size specifies how many rows will be returned # The fetch size specifies how many rows will be fetched from the database per request for per-tenant fetching
init_tenant_fetch_pack_size: "${TB_QUEUE_CF_TENANT_FETCH_PACK_SIZE:1000}" init_tenant_fetch_pack_size: "${TB_QUEUE_CF_TENANT_FETCH_PACK_SIZE:1000}"
transport: transport:
# For high-priority notifications that require minimum latency and processing time # For high-priority notifications that require minimum latency and processing time

View File

@ -24,7 +24,6 @@ import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor; import org.mockito.ArgumentCaptor;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoExtension;
import org.slf4j.Logger;
import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.util.ReflectionTestUtils;
import org.thingsboard.server.common.data.id.DeviceId; import org.thingsboard.server.common.data.id.DeviceId;
import org.thingsboard.server.common.data.id.TenantId; import org.thingsboard.server.common.data.id.TenantId;
@ -52,8 +51,6 @@ public class DefaultTbCoreConsumerServiceTest {
private TbCoreConsumerStats statsMock; private TbCoreConsumerStats statsMock;
@Mock @Mock
private RuleEngineCallService ruleEngineCallServiceMock; private RuleEngineCallService ruleEngineCallServiceMock;
@Mock
private Logger logMock;
@Mock @Mock
private TbCallback tbCallbackMock; private TbCallback tbCallbackMock;
@ -72,7 +69,6 @@ public class DefaultTbCoreConsumerServiceTest {
executor = MoreExecutors.newDirectExecutorService(); executor = MoreExecutors.newDirectExecutorService();
ReflectionTestUtils.setField(defaultTbCoreConsumerServiceMock, "stateService", stateServiceMock); ReflectionTestUtils.setField(defaultTbCoreConsumerServiceMock, "stateService", stateServiceMock);
ReflectionTestUtils.setField(defaultTbCoreConsumerServiceMock, "deviceActivityEventsExecutor", executor); ReflectionTestUtils.setField(defaultTbCoreConsumerServiceMock, "deviceActivityEventsExecutor", executor);
ReflectionTestUtils.setField(defaultTbCoreConsumerServiceMock, "log", logMock);
} }
@AfterEach @AfterEach