Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Incorrect validation may cause the batch send of events to fail #3273

Closed
2 tasks done
epiao55 opened this issue Feb 26, 2023 · 0 comments · Fixed by #3274
Closed
2 tasks done

[Bug] Incorrect validation may cause the batch send of events to fail #3273

epiao55 opened this issue Feb 26, 2023 · 0 comments · Fixed by #3274
Assignees
Labels
bug Something isn't working
Milestone

Comments

@epiao55
Copy link
Contributor

epiao55 commented Feb 26, 2023

Search before asking

  • I had searched in the issues and found no similar issues.

Environment

Windows

EventMesh version

master

What happened

path is org/apache/eventmesh/runtime/core/protocol/http/processor/BatchSendMessageProcessor.java

i think this is a bug when i read code of master branch. This will cause the batch send of events to fail.

            if (eventData != null || StringUtils.isBlank(batchId)
                    || StringUtils.isBlank(producerGroup)
                    || eventSize != eventList.size()) {
                responseEventMeshCommand = asyncContext.getRequest().createHttpCommandResponse(
                        sendMessageBatchResponseHeader,
                        SendMessageBatchResponseBody.buildBody(EventMeshRetCode.EVENTMESH_PROTOCOL_BODY_ERR.getRetCode(),
                                EventMeshRetCode.EVENTMESH_PROTOCOL_BODY_ERR.getErrMsg()));
                asyncContext.onComplete(responseEventMeshCommand);
                return;
            }

The validation of eventData should be changed to '==null'.

How to reproduce

just read the code

Debug logs

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@epiao55 epiao55 added the bug Something isn't working label Feb 26, 2023
epiao55 pushed a commit to epiao55/incubator-eventmesh that referenced this issue Feb 26, 2023
epiao55 pushed a commit to epiao55/incubator-eventmesh that referenced this issue Feb 27, 2023
xwm1992 added a commit that referenced this issue Mar 15, 2023
[ISSUE #3273] fix incorrect validation
@xwm1992 xwm1992 added this to the 1.9.0 milestone Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants