Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions connectors/common/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,8 @@ func (c *connector) StartReadToChannel(flowId iface.FlowID, options iface.Connec
mutationType = iface.MutationType_Update
case adiomv1.UpdateType_UPDATE_TYPE_DELETE:
mutationType = iface.MutationType_Delete
case adiomv1.UpdateType_UPDATE_TYPE_PARTIAL_UPDATE:
mutationType = iface.MutationType_Apply
}

dataChannel <- iface.DataMessage{
Expand All @@ -822,6 +824,8 @@ func (c *connector) StartReadToChannel(flowId iface.FlowID, options iface.Connec
mutationType = iface.MutationType_Update
case adiomv1.UpdateType_UPDATE_TYPE_DELETE:
mutationType = iface.MutationType_Delete
case adiomv1.UpdateType_UPDATE_TYPE_PARTIAL_UPDATE:
mutationType = iface.MutationType_Apply
}

dataChannel <- iface.DataMessage{
Expand All @@ -843,6 +847,8 @@ func (c *connector) StartReadToChannel(flowId iface.FlowID, options iface.Connec
mutationType = iface.MutationType_Update
case adiomv1.UpdateType_UPDATE_TYPE_DELETE:
mutationType = iface.MutationType_Delete
case adiomv1.UpdateType_UPDATE_TYPE_PARTIAL_UPDATE:
mutationType = iface.MutationType_Apply
}
c.progressTracker.UpdateChangeStreamProgressTracking()
readerProgress.changeStreamEvents.Add(1)
Expand Down Expand Up @@ -1123,21 +1129,27 @@ func (c *connector) ProcessDataMessages(dataMsgs []iface.DataMessage) error {
c.progressTracker.UpdateWriteLSN(dataMsg.SeqNum)
case iface.MutationType_Insert:
msgs = append(msgs, &adiomv1.Update{
Id: *&dataMsg.Id,
Id: dataMsg.Id,
Type: adiomv1.UpdateType_UPDATE_TYPE_INSERT,
Data: *dataMsg.Data,
})
case iface.MutationType_Update:
msgs = append(msgs, &adiomv1.Update{
Id: *&dataMsg.Id,
Id: dataMsg.Id,
Type: adiomv1.UpdateType_UPDATE_TYPE_UPDATE,
Data: *dataMsg.Data,
})
case iface.MutationType_Delete:
msgs = append(msgs, &adiomv1.Update{
Id: *&dataMsg.Id,
Id: dataMsg.Id,
Type: adiomv1.UpdateType_UPDATE_TYPE_DELETE,
})
case iface.MutationType_Apply:
msgs = append(msgs, &adiomv1.Update{
Id: dataMsg.Id,
Type: adiomv1.UpdateType_UPDATE_TYPE_PARTIAL_UPDATE,
Data: *dataMsg.Data,
})
default:
slog.Error(fmt.Sprintf("unsupported operation type during batch: %v", dataMsg.MutationType))
}
Expand Down
3 changes: 3 additions & 0 deletions internal/app/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ func (tv *TViewDetails) SetUpDisplay(app *tview.Application, errorText *tview.Te
AddItem(progressBarTextView, 1, 1, false).
AddItem(errorText, 0, 1, false)
tv.root = root //indices are 0, 1, 2, 3, corresponding to header, table, progressBar, and errorLogs respectively
table.SetFixed(1, 0) // Keep the header row fixed
table.SetSelectable(true, false) // Allow row selection (vertical scrolling)
tv.app.SetRoot(root, true)
tv.app.SetFocus(table) // Set focus to the table (so that the user can scroll through it)
}

// Get the latest status report based on the runner progress struct and update the tview components accordingly
Expand Down
2 changes: 2 additions & 0 deletions protocol/iface/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const (
MutationType_Ignore

MutationType_Barrier

MutationType_Apply
)

const (
Expand Down
Loading