refactor(LogsViewer, DataMigrations, Routes): convert comments to block comments for clarity

This commit is contained in:
Nawaz Dhandala
2026-03-12 15:13:21 +00:00
parent 7e48bbb206
commit 375b2e67d0
3 changed files with 17 additions and 9 deletions

View File

@@ -465,8 +465,10 @@ const LogsViewer: FunctionComponent<ComponentProps> = (
});
}, [props.activeFilters, serviceMap]);
// Replace serviceId UUIDs with human-readable names in value suggestions
// Must be before early returns to maintain consistent hook call order.
/*
* Replace serviceId UUIDs with human-readable names in value suggestions
* Must be before early returns to maintain consistent hook call order.
*/
const resolvedValueSuggestions: Record<string, Array<string>> | undefined =
useMemo(() => {
if (!props.valueSuggestions) {
@@ -489,8 +491,10 @@ const LogsViewer: FunctionComponent<ComponentProps> = (
return suggestions;
}, [props.valueSuggestions, serviceMap]);
// Wrap onFieldValueSelect to resolve service names back to UUIDs
// Must be before early returns to maintain consistent hook call order.
/*
* Wrap onFieldValueSelect to resolve service names back to UUIDs
* Must be before early returns to maintain consistent hook call order.
*/
const handleFieldValueSelectWithServiceResolve:
| ((fieldKey: string, value: string) => void)
| undefined = useMemo(() => {

View File

@@ -183,8 +183,10 @@ export default class AddRetentionDateAndSkipIndexesToTelemetryTables extends Dat
await this.setTTL(ExceptionInstanceService, "ExceptionItem");
await this.setTTL(MonitorLogService, "MonitorLog");
// Step 8: Fix retentionDate for pre-existing rows that have epoch-zero value.
// Without this fix, TTL would delete all pre-existing data on next merge.
/*
* Step 8: Fix retentionDate for pre-existing rows that have epoch-zero value.
* Without this fix, TTL would delete all pre-existing data on next merge.
*/
await this.executeWithLogging(
LogService,
`ALTER TABLE LogItem UPDATE retentionDate = time + INTERVAL 15 DAY WHERE retentionDate = toDateTime('1970-01-01 00:00:00') SETTINGS mutations_sync=0`,

View File

@@ -134,9 +134,11 @@ import "./Jobs/Metrics/DeleteAlertMetricOlderThanXDays";
import "./Jobs/OnCallDutySchedule/RefreshHandoffTime";
// DeleteMonitorLogOlderThan24Hours cron job removed — TTL via retentionDate column
// now handles automatic MonitorLog retention in ClickHouse. Retention days are read
// from GlobalConfig.monitorLogRetentionInDays at ingestion time in MonitorLogUtil.
/*
* DeleteMonitorLogOlderThan24Hours cron job removed — TTL via retentionDate column
* now handles automatic MonitorLog retention in ClickHouse. Retention days are read
* from GlobalConfig.monitorLogRetentionInDays at ingestion time in MonitorLogUtil.
*/
import "./Jobs/OnCallPolicy/DeleteOldTimeLogs";