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]UpstreamCheckService#check error #4298

Closed
1 task done
liukun321 opened this issue Jan 6, 2023 · 0 comments · Fixed by #4430
Closed
1 task done

[BUG]UpstreamCheckService#check error #4298

liukun321 opened this issue Jan 6, 2023 · 0 comments · Fixed by #4430
Labels
type: bug Something isn't working

Comments

@liukun321
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

PENDING_SYNC was not set when checking upstream successfully, resulting in unable to update the handler of selector

Expected Behavior

private void check(final String selectorId, final List upstreamList) {
List successList = Lists.newArrayListWithCapacity(upstreamList.size());
for (CommonUpstream commonUpstream : upstreamList) {
final boolean pass = UpstreamCheckUtils.checkUrl(commonUpstream.getUpstreamUrl());
if (pass) {
if (!commonUpstream.isStatus()) {
commonUpstream.setTimestamp(System.currentTimeMillis());
commonUpstream.setStatus(true);
// add PENDING_SYNC
PENDING_SYNC.add(commonUpstream.hashCode());
LOG.info("UpstreamCacheManager check success the url: {}, host: {} ", commonUpstream.getUpstreamUrl(), commonUpstream.getUpstreamHost());
}
successList.add(commonUpstream);
................

Steps To Reproduce

No response

Environment

ShenYu version(s):2.5.0

Debug logs

No response

Anything else?

No response

@liukun321 liukun321 added the type: bug Something isn't working label Jan 6, 2023
@liukun321 liukun321 changed the title UpstreamCheckService#check error [BUG]UpstreamCheckService#check error Jan 6, 2023
iwangjie added a commit to iwangjie/shenyu that referenced this issue Mar 4, 2023
yu199195 added a commit that referenced this issue Mar 9, 2023
Co-authored-by: xiaoyu <xiaoyu@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant