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

ZOOKEEPER-2892: Improve lazy initialize and close stream for PrepRequestProcessor #361

Closed
wants to merge 1 commit into from
Closed

Conversation

@asdf2014
Copy link
Member

@asdf2014 asdf2014 commented Sep 6, 2017

Improve lazy initialize and close stream for PrepRequestProcessor

  • Delay the initialization of ChangeRecord and ReconfigRequest variables
  • Close the ByteArrayOutputStream I/O stream

@hanm PTAL

@asdf2014
Copy link
Member Author

@asdf2014 asdf2014 commented Sep 6, 2017

Seems like jenkins cannot work normally? @hanm

GitHub pull request #361 to apache/zookeeper
[EnvInject] - Loading node environment variables.
ERROR: SEVERE ERROR occurs
org.jenkinsci.lib.envinject.EnvInjectException: java.io.IOException: Remote call on H5 failed
	at org.jenkinsci.plugins.envinject.EnvInjectListener.loadEnvironmentVariablesNode(EnvInjectListener.java:86)
	at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:43)
	at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:528)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:448)
	at hudson.model.Run.execute(Run.java:1735)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:405)
Caused by: java.io.IOException: Remote call on H5 failed
	at hudson.remoting.Channel.call(Channel.java:838)
	at hudson.FilePath.act(FilePath.java:1081)
	at org.jenkinsci.plugins.envinject.service.EnvInjectActionSetter.addEnvVarsToRun(EnvInjectActionSetter.java:59)
	at org.jenkinsci.plugins.envinject.EnvInjectListener.loadEnvironmentVariablesNode(EnvInjectListener.java:83)
	... 7 more
Caused by: java.lang.OutOfMemoryError: Java heap space
ERROR: Step ?Archive the artifacts? failed: no workspace for PreCommit-ZOOKEEPER-github-pr-build #998
ERROR: Step ?Publish JUnit test result report? failed: no workspace for PreCommit-ZOOKEEPER-github-pr-build #998
[description-setter] Could not determine description.
Putting comment on the pull request
[EnvInject] - [ERROR] - SEVERE ERROR occurs: Remote call on H5 failed
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
Sending email to: dev@zookeeper.apache.org
Warning: this build has no associated authentication, so build permissions may be lacking, and downstream projects which cannot even be seen by an anonymous user will be silently skipped
Finished: FAILURE
@hanm
Copy link
Contributor

@hanm hanm commented Sep 6, 2017

Looks like a transient error, you can try retrigger Jenkins job by closing and reopening the pull request, or just generate a new commit hash (git commit --amend) and force push to remote.

@asdf2014
Copy link
Member Author

@asdf2014 asdf2014 commented Sep 6, 2017

Okay, I'll try it.

@asdf2014 asdf2014 closed this Sep 6, 2017
@asdf2014 asdf2014 reopened this Sep 6, 2017
@asdf2014
Copy link
Member Author

@asdf2014 asdf2014 commented Sep 6, 2017

@hanm It works, thx a lot. 👍

Copy link
Contributor

@hanm hanm left a comment

Good optimizations, thanks for doing this @asdf2014.

There are some merge conflicts with top of master, caused by an earlier commit today. Please resolve the conflict and update this pull request, then I'll merge.

@asdf2014
Copy link
Member Author

@asdf2014 asdf2014 commented Sep 12, 2017

@hanm Thanks for your suggestion. Conflicts has been fixed.

@asdf2014 asdf2014 closed this Sep 18, 2017
@asdf2014 asdf2014 reopened this Sep 18, 2017
Copy link
Member

@maoling maoling left a comment

ping @hanm

@anmolnar
Copy link
Contributor

@anmolnar anmolnar commented Feb 1, 2019

retest this please

@anmolnar
Copy link
Contributor

@anmolnar anmolnar commented Feb 1, 2019

@asdf2014 This looks like a nice improvement, would you mind fixing the build?

@asdf2014
Copy link
Member Author

@asdf2014 asdf2014 commented Feb 1, 2019

@anmolnar Of course, I will solve this build problem later.

@asdf2014
Copy link
Member Author

@asdf2014 asdf2014 commented Feb 1, 2019

@anmolnar Done.

@anmolnar
Copy link
Contributor

@anmolnar anmolnar commented Feb 1, 2019

@hanm Are u happy to merge this?

Copy link
Contributor

@anmolnar anmolnar left a comment

+1 LGTM

@maoling
maoling approved these changes Feb 2, 2019
@maoling
Copy link
Member

@maoling maoling commented Feb 6, 2019

ping @anmolnar

@asfgit asfgit closed this in c418b44 Feb 7, 2019
@anmolnar
Copy link
Contributor

@anmolnar anmolnar commented Feb 7, 2019

Merged to master. Thanks @asdf2014 !

@asdf2014 asdf2014 deleted the asdf2014:ZOOKEEPER-2892 branch Feb 8, 2019
@asdf2014
Copy link
Member Author

@asdf2014 asdf2014 commented Feb 8, 2019

@anmolnar You are welcome. @maoling Thanks for the ping!

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