Skip to content

[INLONG-12010][SDK] Fix the problem of truncated string data containing Chinese characters when reporting using Dataproxy Python SDK - #12011

Merged
doleyzi merged 1 commit into
apache:masterfrom
yfsn666:INLONG-12010
Sep 28, 2025
Merged

doleyzi merged 1 commit into
apache:masterfrom
yfsn666:INLONG-12010

Conversation

@yfsn666

@yfsn666 yfsn666 commented Sep 28, 2025

Copy link
Copy Markdown
Contributor

Fixes #12010

Motivation

When reporting a string containing Chinese characters, the length of a Chinese character in Python is 1, while the length of a Chinese character in C++ is 3, which causes the string length calculated by Python to be smaller than that in C++. Therefore, the reported length needs to be recalculated according to the C++ rules in the send() function to avoid data truncation.

Modifications

modify the inlong_dataproxy.cpp file

Verifying this change

(Please pick either of the following options)

  • This change is a trivial rework/code cleanup without any test coverage.

  • This change is already covered by existing tests, such as:
    (please describe tests)

  • This change added tests and can be verified as follows:

    (example:)

    • Added integration tests for end-to-end deployment with large payloads (10MB)
    • Extended integration test for recovery after broker failure

Documentation

  • Does this pull request introduce a new feature? no

…ng Chinese characters when reporting using Dataproxy Python SDK
@doleyzi
doleyzi merged commit 8fb2b49 into apache:master Sep 28, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][SDK] Python DataProxy SDK reported data is truncated

3 participants