[Carol] Carol 2C - Desabilitando tabelas
Opis
Clone de PRDE-8016 (External Support) para tracking técnico como Bug.
Origem:
-
Issue Jira Produção: https://jiraproducao.totvs.com.br/browse/IDEIA-3831
-
Cliente: UNI EMPREENDIMENTOS LTDA - T02176 — "Tabela desabilitando (3.7.6)"
-
Org/tenant: sinaf — Ambiente: Produção (on premise)
Problema:
-
O 2C está inativando a tabela quando tenta enviar dados e a tabela está com LOCK (change in progress).
Evidência (log do cliente):
errorCode=400, errorMessage='The schema [sra] in the tenant [5286f051a04a4d03b6d49e580d9169ea] can''t be changed now. It has a change in progress.'
→ Nesse cenário, a plataforma devolve HTTP 400.
Detalhes técnicos:
Hoje o connector inativa a tabela ao interpretar o retorno do intake como "field type change", sem inspecionar errorMessage / applicationErrorCode para distinguir a causa — registrando a mensagem enganosa "field type change", notificando os admins com CC_INTEGRATION_STOPPED e inativando a tabela.
Erro observado no log do 2C:
[2026-07-20 12:35:33.233] [DEBUG] c.t.m.a.a.e.EntityCarolSchemaManager - Response: V2StagingMappingResponse{mdmId='null', mdmCreated=null, mdmStagingType='null', errorCode=400, errorMessage='The schema [sra] in the tenant [5286f051a04a4d03b6d49e580d9169ea] can't be changed now. It has a change in progress.', possibleResponsibleField='mdmBigQuerySynchronizationStatus'}
Como consequencia, 2C inativa a tabela:
[2026-07-20 12:35:33.280] [INFO ] c.t.m.d.AbstractConnectionDao - Skipping the trigger carol_3c_tg_upd_dbo_SRA090.[2026-07-20 12:35:33.280] [INFO ] c.t.m.d.AbstractConnectionDao - Skipping the trigger carol_3c_tg_del_dbo_SRA090.[2026-07-20 12:35:33.280] [INFO ] c.t.m.d.AbstractConnectionDao - Skipping the trigger carol_3c_tg_dbo_SRA090.[2026-07-20 12:35:33.280] [DEBUG] c.t.m.d.AbstractConnectionDao - Dropping payload dir for SRA090.[2026-07-20 12:35:33.280] [DEBUG] c.t.m.d.AbstractConnectionDao - Dropping scheduled initial load for SRA090.[2026-07-20 12:35:33.280] [DEBUG] c.t.m.d.AbstractConnectionDao - Cleaning queue: DELETE FROM dbo.carol_3c_queue where lower(table_name)=lower('dbo.SRA090');[2026-07-20 12:35:33.280] [DEBUG] c.t.m.a.a.e.EntityTriggerManager - Entity SRA090 is now disabled[2026-07-20 12:35:33.280] [DEBUG] c.t.m.a.a.e.EntityEnableSyncManager - Table SRA090 was disabled successfully[2026-07-20 12:35:33.280] [DEBUG] c.t.m.a.a.e.EntityEnableSyncManager - Deleting transaction file for schema...
Devemos tratar "change in progress" e aplicar uma janela de retry e só desativar em incompatibilidade real de tipo de campo após janela de retry.
Critério de aceite:
-
Detectar "change in progress" pelo
errorMessage/applicationErrorCode. -
O 2C deve retentar o reenvio por até 6 horas caso a tabela esteja em change in progress.
-
Só inativar a tabela se ela permanecer em change in progress após a janela de 6 horas, ou em caso de incompatibilidade real de tipo de campo.
-
Registrar em logs todas as tentativas, para traceability futuro.
-
Incluir no heart-beat os detalhes de tabelas com change in progress, para visibilidade na Carol.