Skip to content

Commit

Permalink
Relation message mapping wasn't getting merged (#1354)
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik authored Feb 22, 2024
1 parent 192db33 commit 833a4e8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions flow/workflows/cdc_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"log/slog"
"maps"
"strings"
"time"

Expand Down Expand Up @@ -192,12 +193,10 @@ func (w *CDCFlowWorkflowExecution) processCDCFlowConfigUpdates(ctx workflow.Cont
return err
}

for tableID, tableName := range res.SyncFlowOptions.SrcTableIdNameMapping {
state.SyncFlowOptions.SrcTableIdNameMapping[tableID] = tableName
}
for tableName, tableSchema := range res.SyncFlowOptions.TableNameSchemaMapping {
state.SyncFlowOptions.TableNameSchemaMapping[tableName] = tableSchema
}
maps.Copy(state.SyncFlowOptions.SrcTableIdNameMapping, res.SyncFlowOptions.SrcTableIdNameMapping)
maps.Copy(state.SyncFlowOptions.TableNameSchemaMapping, res.SyncFlowOptions.TableNameSchemaMapping)
maps.Copy(state.SyncFlowOptions.RelationMessageMapping, res.SyncFlowOptions.RelationMessageMapping)

state.SyncFlowOptions.TableMappings = append(state.SyncFlowOptions.TableMappings, flowConfigUpdate.AdditionalTables...)
}
// finished processing, wipe it
Expand Down

0 comments on commit 833a4e8

Please sign in to comment.