PREQUEL-2025-0097
Loki Compactor Schema Table MismatchMediumImpact: 6/10Mitigation: 5/10
Description
Loki compactor encounters schema configuration mismatches when it finds index tables in object storage\nthat don't correspond to any configured schema period in the Loki configuration. This causes the compactor\nto skip compaction for those tables, leading to storage inefficiency and potential query performance degradation.\nThe issue typically occurs after schema migrations, configuration changes, or when legacy data exists with\ndifferent table naming conventions.\n
Mitigation
- Review schema_config.configs in Loki configuration to ensure all expected table prefixes are covered\n- Add missing schema entries for orphaned index tables if data should be retained\n- Update index prefix settings to match existing table names in object storage\n- Clean up orphaned index tables if they represent obsolete data\n- Implement proper schema migration procedures for future changes\n- Monitor compactor logs for schema mismatch patterns during configuration changes\n- Document schema evolution and table naming conventions for operational teams\n