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

Use of HttpConfiguration.setBlockingTimeout(long) in jetty.xml produces warning on jetty-home startup #4084

Closed
joakime opened this issue Sep 12, 2019 · 14 comments
Assignees
Labels
Bug For general bugs on Jetty side

Comments

@joakime
Copy link
Contributor

joakime commented Sep 12, 2019

The HttpConfiguration.setBlockingTimeout(long) is deprecated.
The new deprecation warnings in XmlConfiguration is correctly reporting that our use of setBlockingTimeout(long) is deprecated.
Even if we are not setting it to a value (default value in jetty-home modules / xml is -1)

2019-09-11 16:22:35.810:WARN:oejx.XmlConfiguration:main: Deprecated method public void org.eclipse.jetty.server.HttpConfiguration.setBlockingTimeout(long) in
     file:///home/joakim/code/jetty/distros/jetty-home-9.4.20.v20190813/etc/jetty.xml

Should we make an effort to remove this warning?

@sbordet
Copy link
Contributor

sbordet commented Sep 12, 2019

Yes, it's our own stuff and we should not warn but fix it.

@gregw gregw self-assigned this Sep 18, 2019
@gregw
Copy link
Contributor

gregw commented Sep 18, 2019

@joakime @sbordet I'm not sure how to fix this? Either we remove the <Set> in jetty.xml, in which case we have removed a deprecated feature in a dot release, or we don't warn?

In 10, we have the ability to avoid the warning by using <Set property=foobar/>, but that doesn't help us for 9

@gregw
Copy link
Contributor

gregw commented Sep 18, 2019

I think I will just make the warning a debug for now.

gregw added a commit that referenced this issue Sep 18, 2019
Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw
Copy link
Contributor

gregw commented Sep 18, 2019

I made it debug only in 9, but kept the warning in 10 (as it has the <Set property=foobar/> symmantic to avoid the warning if need be).

@gregw gregw closed this as completed Sep 18, 2019
@joakime
Copy link
Contributor Author

joakime commented Sep 18, 2019

I would have preferred that XmlConfiguration not attempt to <Set> call.
Either because the property is empty/unset.
Or if the value provided is the same as the default value.

@joakime joakime reopened this Sep 18, 2019
@sbordet
Copy link
Contributor

sbordet commented Sep 18, 2019

Yes we want the warnings, and we can easily remove the call from the XML - the default value should be the same.
IMHO @gregw's changes should be reverted.

@gregw
Copy link
Contributor

gregw commented Sep 18, 2019

I think we have enough to do on other issues. Let's not sweat this one in 9.4 - all is good in 10.

@gregw gregw closed this as completed Sep 18, 2019
@joakime
Copy link
Contributor Author

joakime commented Sep 18, 2019

If we are going to go this route, I would prefer the old 9.4 behavior, reverting commit 157910d on jetty-9.4.x at least.

@gregw gregw assigned joakime and sbordet and unassigned gregw Sep 18, 2019
@gregw
Copy link
Contributor

gregw commented Sep 18, 2019

I really don't think this is worth the effort - but fix it if you like. But we can't have warnings from a normal distro, nor should we remove a feature in a dot release.

@joakime joakime reopened this Sep 18, 2019
joakime added a commit that referenced this issue Sep 19, 2019
joakime added a commit that referenced this issue Sep 19, 2019
+ The XML warning on Deprecated will be squelched (set to DEBUG)
  if the <Set> call has a <Property> (or <SystemProperty>)
  that is using its default value.
  All other uses will still result in WARN level logging event.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
joakime added a commit that referenced this issue Sep 20, 2019
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
joakime added a commit that referenced this issue Sep 20, 2019
…ngtimeout-warning

Issue #4084 - squelch deprecated warning on <Set> call.
@joakime joakime added the Bug For general bugs on Jetty side label Sep 20, 2019
@joakime joakime closed this as completed Sep 20, 2019
@vmassol
Copy link

vmassol commented Sep 30, 2019

@sbordet I don't see where you removed the property from the jetty.xml file. It seems it's still there on master.

@vmassol
Copy link

vmassol commented Sep 30, 2019

FTR I've replaced it with the following but I don't know if that's correct:

    <Set name="minResponseDataRate"><Property name="jetty.httpConfig.minResponseDataRate" default="-1"/></Set>
    <Set name="minRequestDataRate"><Property name="jetty.httpConfig.minRequestDataRate" default="-1"/></Set>

@sbordet
Copy link
Contributor

sbordet commented Sep 30, 2019

@vmassol it's there but we don't WARN about it anymore.
Unfortunately it cannot be removed from the XML file because people may actually use it.

See also #4014 for the actual behavior of the data rates - we may change it in future.

@joakime
Copy link
Contributor Author

joakime commented Sep 30, 2019

@vmassol the setBlockingTimeout(long) was just squelched from WARN to DEBUG in PR #4107 (if that property is unset), due to be in Jetty 9.4.21 (currently staged and being tested).

@vmassol
Copy link

vmassol commented Sep 30, 2019

@sbordet @joakime Thanks guys for your answers (and fast ones!), makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

No branches or pull requests

4 participants