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

fix: When both InputStream and ErrorStream exist, copyStream cannot guarantee sequential execution #735

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

li-phone
Copy link

When both the input stream and the error stream exist in the script processor, the "copyStream" cannot guarantee sequential execution of these streams.

What is the purpose of the change

To guarantee that the output of the task in the script processor is ordered.

Brief changelog

To move the log submits to when the task completed.

Verifying this change

For example, a python script as the following:

print("hello, world")
print(hello, world)

Both the input stream and the error stream exist in this python script, we found that the execution result outputs of this python script were unordered when we view its logs. Therefore, we remove the omsLogger submits in the "copyStream" and move it to when the task completed.

@dudiao
Copy link
Member

dudiao commented Sep 25, 2023

I tested it according to the steps you mentioned and found no disorder.
image

@li-phone
Copy link
Author

I tested it according to the steps you mentioned and found no disorder. image

The out-of-order states do not always occur, it depends on the degree of parallelism of the current task, and the more parallelism, the more likely out-of-order states are to occur. Below is a task with a fixed frequency of 5 seconds.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants