From 67a7a38d259f2328b4a6b685cdea6f1fdb1b0ce5 Mon Sep 17 00:00:00 2001 From: Amogh Bharadwaj Date: Wed, 7 Feb 2024 23:00:20 +0530 Subject: [PATCH] flow api: fix nil pointer handling (#1218) Checks if syncflowoptions is not nil before getting the mirror edits --- flow/cmd/mirror_status.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flow/cmd/mirror_status.go b/flow/cmd/mirror_status.go index feed1bfcfb..e6c272a334 100644 --- a/flow/cmd/mirror_status.go +++ b/flow/cmd/mirror_status.go @@ -92,9 +92,11 @@ func (h *FlowRequestHandler) CDCFlowStatus( } // patching config to show latest values from state - config.IdleTimeoutSeconds = state.SyncFlowOptions.IdleTimeoutSeconds - config.MaxBatchSize = state.SyncFlowOptions.BatchSize - config.TableMappings = state.TableMappings + if state.SyncFlowOptions != nil { + config.IdleTimeoutSeconds = state.SyncFlowOptions.IdleTimeoutSeconds + config.MaxBatchSize = state.SyncFlowOptions.BatchSize + config.TableMappings = state.TableMappings + } var initialCopyStatus *protos.SnapshotStatus