Skip to content

[fix][broker] DnsResolverUtil.TTL should be greater than zero - #18565

Merged
nodece merged 3 commits into
apache:masterfrom
Technoboy-:fix-dns-resolver
Nov 22, 2022
Merged

[fix][broker] DnsResolverUtil.TTL should be greater than zero#18565
nodece merged 3 commits into
apache:masterfrom
Technoboy-:fix-dns-resolver

Conversation

@Technoboy-

Copy link
Copy Markdown
Contributor

Motivation

When the user set DNS cache maxTTl to 0, it will throw below exception :

Caused by: java.lang.IllegalArgumentException: maxTtl : 0 (expected: > 0)
	at io.netty.util.internal.ObjectUtil.checkPositive(ObjectUtil.java:100)
	at io.netty.resolver.dns.DefaultDnsCnameCache.<init>(DefaultDnsCnameCache.java:60)
	at io.netty.resolver.dns.DnsNameResolverBuilder.newCnameCache(DnsNameResolverBuilder.java:451)
	at io.netty.resolver.dns.DnsNameResolverBuilder.build(DnsNameResolverBuilder.java:485)
	at io.netty.resolver.dns.DnsAddressResolverGroup.newNameResolver(DnsAddressResolverGroup.java:114)
	at io.netty.resolver.dns.DnsAddressResolverGroup.newResolver(DnsAddressResolverGroup.java:92)
	at io.netty.resolver.dns.DnsAddressResolverGroup.newResolver(DnsAddressResolverGroup.java:77)
	at io.netty.resolver.AddressResolverGroup.getResolver(AddressResolverGroup.java:70)

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@Technoboy- Technoboy- added this to the 2.12.0 milestone Nov 22, 2022
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Nov 22, 2022
@Technoboy- Technoboy- self-assigned this Nov 22, 2022
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Nov 22, 2022
@codecov-commenter

codecov-commenter commented Nov 22, 2022

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.30%. Comparing base (be1d07e) to head (5e5a8b4).
⚠️ Report is 3271 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #18565       +/-   ##
=============================================
+ Coverage     36.82%   47.30%   +10.48%     
- Complexity     7842    10466     +2624     
=============================================
  Files           698      698               
  Lines         68060    68060               
  Branches       7277     7277               
=============================================
+ Hits          25062    32198     +7136     
+ Misses        39675    32271     -7404     
- Partials       3323     3591      +268     
Flag Coverage Δ
unittests 47.30% <ø> (+10.48%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 133 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tisonkun tisonkun changed the title [fix][broker] Fix DNS cache maxTtl issue. [fix][broker] DnsResolverUtil.TTL should be greater than zero Nov 22, 2022

@tisonkun tisonkun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. One minor suggestion.

@nodece
nodece merged commit 67f9461 into apache:master Nov 22, 2022
codelipenghui pushed a commit that referenced this pull request Nov 23, 2022
codelipenghui pushed a commit that referenced this pull request Nov 23, 2022
codelipenghui pushed a commit that referenced this pull request Nov 23, 2022
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Nov 23, 2022
congbobo184 pushed a commit that referenced this pull request Nov 26, 2022
lifepuzzlefun pushed a commit to lifepuzzlefun/pulsar that referenced this pull request Dec 9, 2022
lifepuzzlefun pushed a commit to lifepuzzlefun/pulsar that referenced this pull request Jan 10, 2023
@Technoboy-
Technoboy- deleted the fix-dns-resolver branch September 14, 2023 11:34
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.

9 participants