close
Skip to content

[Bug][Connector-v2] MongoDB CDC Set SeatunnelRow's tableId#7935

Merged
hailin0 merged 5 commits into
apache:devfrom
hawk9821:mongodb_cdc
Nov 6, 2024
Merged

[Bug][Connector-v2] MongoDB CDC Set SeatunnelRow's tableId#7935
hailin0 merged 5 commits into
apache:devfrom
hawk9821:mongodb_cdc

Conversation

@hawk9821

Copy link
Copy Markdown
Contributor

Purpose of this pull request

Does this PR introduce any user-facing change?

method of MongoDBConnectorDeserializationSchema.extractTableId not implemented , The tableId of SeatunnelRow is null, which may affect other downstream operations.
2716d3d925a1bb6e23d85a2e79dc149

How was this patch tested?

Check list

hailin0
hailin0 previously approved these changes Nov 1, 2024
@Hisoka-X Hisoka-X added the don't merge There needs to be a specific reason in the PR, and it cannot be merged for the time being. label Nov 1, 2024
```

## Feature
- Support Multi-table Synchronization for MongoDB-CDC.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where?

"inventory.products",
keyDocument,
valueDocument);
Object tableId = ReflectionUtils.invoke(schema, "extractTableId", sourceRecord);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use @VisibleForTesting annotation to avoid use ReflectionUtils.

Comment on lines +94 to +95
List<String> collections = context.getOptions().get(MongodbSourceOptions.COLLECTION);
if (collections.size() != configCatalog.size()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about add a test case for mongocdc with multi tables.

@Hisoka-X Hisoka-X left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting CI passes

@hailin0 hailin0 merged commit f3970d6 into apache:dev Nov 6, 2024
@hawk9821 hawk9821 deleted the mongodb_cdc branch November 6, 2024 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved cdc document don't merge There needs to be a specific reason in the PR, and it cannot be merged for the time being.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants